Skip to main content
Nintex Community Menu Bar

I need to set a few HTTP headers in a REST call. How can this be done?

bump.


I have a rest endpoint where I need to set header parameters, not at the connector level but specifically with data values. I need a body and headers, so I can’t use the ‘In request headers - one per changed field’


Is this possible?


Hi Paul, have you been able to make any progress on this?


We recommend you test out your request in Postman


  1. first to make sure it works, and then you can transcribe the values into Skuid.

Headers


  1. that should be sent with every request are set up at the Data Source level ( Data sources --> Data Source --> Common HTTP Request Data)

Screen Shot 2020-09-03 at 2.43.51 PM.png



  1. For values to be set in the Body, you can set this up using a snippet. In the model properties, for Request Body Contents, you can choose As custom payload format in request body, and then you can write a Payload generation snippet to use for this.


  1. Parameters: You can send dynamic values in the Data source URL on the model properties.

Screen Shot 2020-09-03 at 2.59.49 PM.png


Does that help answer your question?


Hi ​@annajosephine 

 

Where would you find the Payload generation snippet? I have a XML body request but not sure where to write it.


Hey ​@Bobbyvil, you have two options.

  1. You can write the snippet in the Javascript section of the Composer. It will be accessible only for this page.
  2. To reuse it (and to make it cache-able) you can also upload a JS resource to Files (Nintex Apps / Skuid NLX) or Static Resource (in Salesforce). Then just reference the Javascript resource in that same Javascript section of the Composer.

https://docs.skuid.com/latest/en/skuid/javascript/resource-types/#resource-types
 


Reply