The ThingHTTP App allows a microcontroller or low-level device to connect to any web service using HTTP over a network or Internet. You create an HTTP object using the ThingHTTP App and then control the object with simple API commands. ThingHTTP supports GET, POST, PUT, and DELETE methods, SSL, Basic Authentication, custom hostname, custom headers, different content types, and the 1.0 and 1.1 versions of HTTP. With this app, you can have a device interface with many web services and APIs such as Prowl and Twilio without having to implementing the protocol on the device level.
To perform your ThingHTTP request send an HTTP POST to
and include your ThingHTTP API key and message.
The ThingHTTP request can have placeholders for data to be replaced when the request is sent. To make a replacement, enclose the replacement name in %% signs in the ThingHTTP Body form field. An example Body field might look like:
Then, pass the replacement name in the API request as a parameter, without the enclosing %% signs. An example replacement appears in the example POST request above, with "message" equal to "hello world".
You can retrieve the last value from a Channel field by including the following in the ThingHTTP Body form field:
For example, to set the "message" parameter equal to the last value from Channel 1417, field 1:
ThingHTTP sends back the full response that is generated by the request. If you are looking to extract a piece of data from the response, you can add a Parse String to the ThingHTTP Request. This feature allows you to do the parsing on the ThingSpeak side instead of wasting code space on the device / microcontroller side. The format is Parent_cell.child_cell etc. If you also know the full XPATH to the data, you can specify the XPATH as the Parse String.
you can use a parse string of
to extract the value of the cover_id.