I am currently tring to connect XDK directly to Bosch IoT Things service.

After going through the documents and example code, I know how to post data through plain http service by using Msg_prependPartFactory(), but, is it possible to customize http header? because Things service requires some extra information to be added, e.g. api token.

I got some information of the developer: to customize the http header, you need to adjust the template into the serval stack.

As far as I know there were no changes in version 1.6 related to this issue

with the function Msg_setAuthorizationTokenCustom() you can attatch authorization information to the message. To be exact, an authorisation for a specific user can be added to the message. Currently I have no example code but I requested a snipped for you.

we were trying the exact same thing here: To connect the XDK to Bosch-IoT-Things via REST API. The problem we came across was that the XDK doesn't support https but that is the only way to communicate with the Cloud. At least for now, or so the developers said. So we added another gateway device in order to connect to things. Can anyone on XDK side confirm this?

https is currently in developing state and will be released as soon as it is stable.

As Shaodong already mentioned, it is kind of redundant to push the data to a gateway. But for now, I assume a gateway is a good workaround. You have several possibilities to push the data to the gateway device and post the data to any cloud you like. Additionally I would recommend to use a light protocol to push the data to the gateway device.

Hello there. I am currently working to use the xdk to send data over to thingspeak. Upon trying out the HttpExampleClient template, only the GET request works, and when I comment the GET request task out, leaving only the POST request, I get this error:

the error message refers to an assert during the function xTaskNotifyGive() , which is called with httpGetTaskHandle as its input. Since you probably removed the initialization of that task, the handle keeps the value NULL , thus leading to the assert.

I recommend to remove line 347 of the original code.

This is the call

xTaskNotifyGive(httpGetTaskHandle);

within the function httpGetResponseCallback() .

As for the API key, I assume that you insert it as a Header.

For this, you can use the custom header macro POST_REQUEST_CUSTOM_HEADER_0 on line 105 of HttpExampleClient.h . Keep in mind that the field-name X-AuthToken may have to be changed as well.

For more complex logic in regards to custom headers, you can directly modify the function httpPostCustomHeaderSerializer() in HttpExampleClient.c

Lastly, you said that upon trying out the HttpExampleClient template, only the GET request works . Does that mean that the POST request does not work at all, even without making modifications to the example?

Please tell me if this was helpful, and do not hesitate to ask further questions.