Page 1 of 1

Making HTTPS POST requests with basic auth

Posted: Thu Apr 30, 2020 11:43 pm
by johannesl
Hi everyone!
I am fairly new to MicroPython but had great fun tonight playing around with it.

The session resulted in a bit of source code for making HTTP POST requests to SSL URLs with support for Basic Auth and with the data sent as x-www-form-urlencoded. Anyone looking to do the same can find the code here:

https://github.com/46elks/46elks-gettin ... opython.py

Image

Image

Re: Making HTTPS POST requests with basic auth

Posted: Tue Nov 24, 2020 10:04 am
by xwb
Dear Johannesl
Thanks very much. This is very helpful. I will try and implement tonight and I will report progress if it is successful.

Re: Making HTTPS POST requests with basic auth

Posted: Tue Nov 24, 2020 10:15 am
by xwb
Slight issue:

In line 21 of your code:
TypeError: string indices must be integers, not str


Investigating

Re: Making HTTPS POST requests with basic auth

Posted: Sat May 29, 2021 10:51 am
by johannesl
Happy to see this example was helpful! :-)

I just confirmed that the code from the above GitHub link works using the latest MicroPython 1.15.

What MicroPython version and architecture are you using?