0 Replies Latest reply on Jul 1, 2017 10:38 PM by ajunaid RSS
    ajunaid Newbie

    ESP8266HTTPclient PUT call

    Hello Ben and team,

    Great course !!

    We are trying to update a value on the TWX server on a specific property ...

    we are using  #include <ESP8266HTTPClient.h>

    for some reason the http.PUT method is not invoking correctly ..

    with out the client we are trying the below with no luck.

    const int httpPort = 80;
    if (client.connect(server, httpPort)) {
    String fullRequestURL = String(server) + "/Thingworx/Things/" + ThingName + "/Properties/" + Property + +"?appKey=" + String(APIKEY);
    client.println("PUT /posts HTTP/1.1");
    client.println("Cache-Control: no-cache");
    client.println("Content-Type: application/json");
    client.print("Content-Length: ");
    String PostData = "{\"TEMP\":\"23\"}" ;
    //int len = dataptr.length();

    any input would be appreciated .

    Thanks in advance