Community news, upcoming events and general discussions
Threads: 34 Posts: 86
Get technical support from the community
Threads: 1351 Posts: 7325
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 35 Posts: 117
Share and discuss community member projects
Threads: 76 Posts: 337
Good day, I have set up this chanel in Matlab Thingspeak. The status keep showing "Failed to send HTTP request". May I have some solutions? Thank you.
NetworkConfig_GetIpAddress((uint32_t) "https://api.thingspeak.com/update?api_key=H2XL7UF32O1T2V3Y&field1=0", &destAddr);
Ip_Port_T port = Ip_convertIntToPort(80);
HttpClient_initRequest(&destAddr, port, &msg_ptr);
// send the request
static Callable_T sentCallable;
HttpClient_pushRequest(msg_ptr, &sentCallable, &onHTTPResponseReceived);
We have tested httpexampleclient application with the "api.things.speak.com" the post is successful but the get is failed beacuse callback for the get CB was not received"
I should change the code as below and adapt to the example on the bosch connectivity? Or could you please show the code that you have tested babu? Thank you very much.
// assemble the request message
NetworkConfig_GetIpAddress((uint32_t) "api.things.speak.com", &destAddr);
Please test the application HttpExampleClient under xdk110/Apps in Workbench 3.6.0.Do the following changes in the AppController.h under xdk110/Apps/HttpExampleClient/source/Appcontroller.h
#define WLAN_SSID "YourSSID"
#define WLAN_PSK "YourWifiPassword"
#define DEST_SERVER_HOST "api.thingspeak.com".
Please clean and build the application.
please revert back for any queries.
Is that the cosole below shows that I have succesfully sent the request? I could see that there is some error. May I know what is the meaning of that error? Thank you
INFO | XDK DEVICE 1: HttpRestClientPostResponseCallback: received HTTP status other than 200 OK. status=0
INFO | XDK DEVICE 1: HttpRestClientPostResponseCallback: error while receiving response to POST request. error=1387 (Note : RC_HTTP_CLIENT_NO_RESPONSE-1387 , RC_HTTP_SEND_ERROR-1357)
This message you are getting because the HTTP POST is sucessful from XDK device side seems like HTTP POST is failed from the server end.
Can I add in the ''API key'' and ''Field1=1'' as shown in the code below?
* POST_REQUEST_CUSTOM_HEADER_0 is a custom header which is sent along with the
* POST request. It's meant to demonstrate how to use custom header.
#define POST_REQUEST_CUSTOM_HEADER_0 "H2XL7UF32O1T2V3Y"
* POST_REQUEST_CUSTOM_HEADER_1 is a custom header which is sent along with the
#define POST_REQUEST_CUSTOM_HEADER_1 "field1=1"