Quantcast
Viewing all articles
Browse latest Browse all 4867

MicroPython • Re: Will I be able to run this code on MicroPython?

I've tried your code and progressed but I don't think I fully understand what I need to send in the GET request.
I am afraid I don't know either. I would expect the full caboodle to be something like ...

Code:

GET /xxx HTTP/1.0\r\naccept: application/json\r\napikey: xxx\r\nContent-Length: xxx\r\n\r\nexcludeParameterMetadata: xxx\r\nincludeLocationName: xxx\r\nlatitude: xxx\r\nlongitude: xxx\r\n
There may be more than that needed and 'Content-Length' may be critical. You may need to add those bytes up first, or leave it out rather than set to zero.

The way I'd approach it is to use your original Python version on your Pi with just the website changed to point to a local web server which can show the headers and content posted. Whatever that shows is what you have to replicate.

I am rather busy on another adventure at the moment but will see what I can figure out, check to see if I have a suitable header and content dumping program.

Statistics: Posted by hippy — Sun Feb 11, 2024 3:52 pm



Viewing all articles
Browse latest Browse all 4867

Trending Articles