0 Replies Latest reply on Sep 29, 2017 6:05 AM by csk RSS
    csk Newbie

    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.