A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By rudy
#63035
gdsports wrote:Very cool!

Working after one change. I was getting 444 response code.

Code: Select all    client.print("Content-Length: ");
    client.println(data.length());
    client.println();
    client.println(data);


Change
Code: Select allclient.println(data)
to
Code: Select allclient.print(data)
println adds end of line characters so the extra chars throws off the content length.


I gave that a try and still no go.
User avatar
By martin_g
#63036 Error code 444 means, that the HTTPS request has failed, probably timed out. You might test the logic of the program by sending the JSON structure direcly to Google: just copy it into a file and send (with Linux):

Code: Select all$ curl -d @your_filename.json -H "Content-Type: application/json" -i "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY"


If this works, you (and I) probably need a more robust implementation of an HTTPS request - anything out there?