These are chat archives for esp8266/Arduino

23rd
Sep 2015
Matt Kocaj
@cottsak
Sep 23 2015 00:48
@all anyone know of a lib that wraps up WiFiClient (or WiFiClientSecure?) that makes sending GET and POST requests easier than passing a massive concat string into client.print() .. ?
ie, does all of the base64 encoding (HTTP basic auth), url encoding (Content-Type: application/x-www-form-urlencoded), saves you building up the raw request using strings, and returns the response in a nice usable way (JSON deserialisation would be handy too) .. ?
Neil Kolban
@nkolban
Sep 23 2015 02:34
@igrr Howdy ... back on Sept 5th you mentioned that you might find time to write some docs on how to use the yield() technology that you invented for the Arduino project. Did you ever get around to doing that?
Steve Nelson
@zenmanenergy
Sep 23 2015 13:32
Is there already an example in the works to download a file from a url and store it in spiffs?
Martin Ayotte
@martinayotte
Sep 23 2015 13:46
I don't think there is an already cooked example, but this should be pretty easy by mixing WifiClient download with SPIFFS write file.
Steve Nelson
@zenmanenergy
Sep 23 2015 13:49
Ok. I’m working on one right now, I just didn’t want to duplicate it if someone already wrote one.
Steve Nelson
@zenmanenergy
Sep 23 2015 14:50
Does an https request have a different request string than a port 80? I would have thought you just change the port to 443 in the client.connect(host,port) method?
Martin Ayotte
@martinayotte
Sep 23 2015 15:01
Although I didn't play with SSL yet, with the latest staging, you need to use WifiClientSecure class instead of WifiClient, and yes, it is on 443. Take a look at the example libraries/ESP8266WiFi/examples/HTTPSRequest/HTTPSRequest.ino
Steve Nelson
@zenmanenergy
Sep 23 2015 15:02
oh sweet. I don’t see that in my examples, has that example not made it into the staging codebase?
I don’t see it in the IDE, I do see it on github though.
thank you
Martin Ayotte
@martinayotte
Sep 23 2015 15:06
The example has been added 10 days ago, so if your install is older, you need manual merge from GitHub. Keep me inform, since I didn't try it out, but it is interesting me.
Steve Nelson
@zenmanenergy
Sep 23 2015 15:16
Seems straight forward enough,include another .h file and change: WiFiClient client; to WiFiClientSecure client;…..although it’s crashing for me. I’ll try again after lunch.