ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

I want to pass a Custom Header in REST API Call from External Source to ThingWorx API e.g. If there is an API - http://10.6.141.3:8080/Thingworx/Things/MyThing/Services/getCarDetails, I want to pass a custom header SessionId: 2345 when s

csk
2-Explorer
2-Explorer

I want to pass a Custom Header in REST API Call from External Source to ThingWorx API e.g. If there is an API - http://10.6.141.3:8080/Thingworx/Things/MyThing/Services/getCarDetails, I want to pass a custom header SessionId: 2345 when s

I want to pass a Custom Header in REST API Call from External Source to ThingWorx API

e.g. If there is an API - http://10.6.141.3:8080/Thingworx/Things/MyThing/Services/getCarDetails, I want to pass a custom header SessionId: 2345 when sending the same, this should be available in Thingworx for processing in Services.

Where can I call this JS function  - var headers = req.getAllResponseHeaders().toLowerCase();

This is the way to do in Java, at least I know - http://www.java2novice.com/restful-web-services/jax-rs-httpheaders/

Please let me know how to consume in Thingworx Services Javascript Function for further processing.

Thank you in advance.

0 REPLIES 0
Announcements




Top Tags