When the postKey function is called, I see via the serial debug:
Attempting to post..:Connection OK:---
GET http://my.site.com/r.php?key=TEST HTTP/1.0
Host: my.site..com
---
Posted
However - on the receiving end - nothing shows up.
If I copy / paste the printed data into nc:
[qx.qx-PC] ➤ nc my.site.com 80
GET http://my.site.com/r.php?key=TEST HTTP/1.0
Host: my.site.com
Content-Length: 0
HTTP/1.1 200 OK
Server: nginx
It works.
I’m at a loss at how to further debug this. Anyone had any success with this?
Any update on the webhooks? I thought they were meant to materialise in March
So get HTTP GET requests work great for me, so I know the core can do it.
Is the key string URL encoded? Could it contain funny characters, not like your TEST example?
What about a Connection: close header?
Or a Content-length: 0 header like in your nc example?
I also send an Accept: text/html, text/plain header.
I think you are using up some memory casting your C strings to Arduino String since I am not sure the compiler is smart enough to do the static analysis here. You can just print your C strings like this:
Also you are only waiting 5ms for the response. That might be OK for a local host on the same subnet, but I know for instance that spark.io is about 140 ms away for me, so might want to try waiting longer.