I’m not sure what’s happened but as of around mid-day lots of things stopped working for me that had been working OK for years: Certain http POST requests to my imp agent are being received as method=“GET”!
These requests are all variously sourced from my home network (e.g. Raspberry Pi, ESP8266 and manual testing using the Postman app) The only external POST requests I have are coming in from Amazon servers - and they are received OK as method=“POST”. This is really puzzling me now. I very much doubt that it’s a problem with the imp servers but I’m stuck for ideas on how to go about figuring out what’s happening.
Extra info: Setting up a second imp at home sending http.post to the first imp does work, resulting in receipt of the correct method. So POSTs coming from outside my home network (e.g Amazon, Imp) are just fine.
This second imp also exhibits the same odd receive behaviour with http.onrequest. Using Postman I can quickly switch between different methods and they all come through (PUT, PATCH, DELETE etc.) except for POST which continues to come in as GET. crazy.
PUT and every method other than GET should work, except that POST doesn’t. You’ll see it magically arrive at the Agent as a GET, without a JSON message.
To reiterate, I’m also seeing this with node.mcu Lua (ESP8266) HTTP calls. though I often use Postman to test out web APIs and it should be easy for anyone to replicate the problem.
OK, so what’s apparently changed is HTTPS access is now required. Up until now the Agents were taking non-secure post but it looks like that changed yesterday. Postman works if I prefix agent.electricimp.com with https:// but my ESP8266 devices are going to be a little harder to resolve!
We’re still investigating, but it looks like we inadvertently pushed a change that redirects HTTP to HTTPS. That works transparently with most clients for GET, etc., but maybe not so much for POST.