I realized I can’t do it via https from the core, I turned to using curl and php.
-Disclaimer 1: this is basic test code for a proof of concept…I wouldn’t use it in production
-Disclaimer 2: I referenced work by ktamas77 on github – nice work!
Process is:
When the event happens I’ll make an HTTP GET request to my server, passing in url path parameters
The server will then use php cURL to make the HTTP POST to Firebase
In your core code above you don’t check or clear the response from the server. This will fill up the receive buffer and cause a hard fault on the core. There are a few posts about the problem on the forum… something to watch out for
Has anyone get the HTTP POST request to work on core yet?
I have tried all your suggestion above but I could not get it to work.
My test bed is quite simple. On the server side I run Node.js with a simple thread to accept a Post request on port 8888. I tested this with a simple JavaScript post a form to it and it replies back fine. So, that part is tested.
On the core… most of the time I tested with the TCPClient, codes… 99% of the time it cannot connect to the server. The other 1% of time, it connected but my server did not see the request coming in.
I also did a code using HTTPClient.h library… well, it could not compile due to many errors.
So, can someone post a working code for sending HTTP POST please…