Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 11 months ago.
HTTP request and get - equivalent
I am currently working on ThingSpeak with Vodafone K3772. All you need to do is send a GET request to the URL provided for your channel. But the example i found was of Ethernet connectivity. I could not find any for Vodafone.
urlBuffer[0] = 0; sprintf(urlBuffer, "%s?key=%s&field1=%s&field2=%f", thingSpeakUrl, thingSpeakKey, timeBuffer, temperature); printf("Request to %s\r\n", urlBuffer);
HTTPText resp; HTTPResult res = http.get(urlBuffer, &resp); if (res == HTTP_OK) { printf("Result :\"%s\"\r\n", resp.gets()); } else { printf("Error %d\r\n", res); }
wait(16); limited by ThingSpeak's API
Entire tutorial is available at http://www.frank-zhao.com/thingspeak_mbed_tut1/ Please help me with the same.