urequest library with cookie support and some redirect enhancements

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
mardi2020
Posts: 15
Joined: Fri Mar 06, 2020 8:48 am

urequest library with cookie support and some redirect enhancements

Post by mardi2020 » Mon Mar 23, 2020 8:47 pm

Hi,

i extended the uurequest.py from pfalcon to support cookies, some improvement for redirects and a method to extract parts of larger response bodies, which don't fit in the heap of a ESP32.

https://github.com/mardigras2020/urequests

There are a lot of changes at once, which usually violate contribution guidelines, therefore i can't just open an PR.
So if somebody is interested - feel free to use.

mardi2020

User avatar
jimmo
Posts: 1380
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: urequest library with cookie support and some redirect enhancements

Post by jimmo » Tue Mar 24, 2020 12:48 am

Hi,

I'm keen to try a bit of a fresh approach to micropython-lib, so would be happy to help you try and get any improvements merged. urequests is a good example of the sort of module I'd like to see be more useful and understandable and these sound like good changes. See https://github.com/micropython/micropython-lib/pull/376 for some more context.

The "small, single-feature PR" convention does certainly help a lot with review. But if you're interested in trying to get it merged why not try and split it up into a few smaller commits? ("git add -p" is your friend here).

Otherwise hopefully someone else might be interested in doing this. Or I might get to it eventually.....

mardi2020
Posts: 15
Joined: Fri Mar 06, 2020 8:48 am

Re: urequest library with cookie support and some redirect enhancements

Post by mardi2020 » Tue Mar 24, 2020 7:01 am

Hi,

I will give it a try in the next days.

mardi2020

mardi2020
Posts: 15
Joined: Fri Mar 06, 2020 8:48 am

Re: urequest library with cookie support and some redirect enhancements

Post by mardi2020 » Tue Mar 24, 2020 12:34 pm

Hi,

i added a first part as PR where i'm sure it works standalone.

mardi2020

Post Reply