Page 2 of 2

Re: WAMP/AutobahnPython support in MicroPython

Posted: Sun Oct 18, 2015 12:55 pm
by pfalcon
Btw is there any simple http client library I could use to perform simple HTTP GET and receive content of a file from the server or should I do it via manual constructing of HTTP GET TCP payload (e.g. "GET /getFile HTTP/1.0\r\n\r\n").
I did a lot of work to make standard CPython http.client module work. In the end I made it run for some sites (but not others, depending on protocol options used by a site). But it takes 200KB of heap just to load all the dependent modules, so it will never run on PyBoard. Given that HTTP protocol in its core is dead simple, sending direct requests like you quote and getting responses is the easiest way to get work done. There're also examples of simple HTTP client and server includes as examples in uPy distribution: https://github.com/micropython/micropyt ... mples/unix