cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Rest post cookies

nganapathiraju
Former Employee

Continuing the discussion from Request Body in Rest API Pipeline:

@tstack @dmiller

Can you guys take a look at this?

This request needs a Cookie to be sent across and authenticated via our REST POST snap.

I have tried the same request in SOAPUI and it works. I was trying to get it to work in POSTMAN but even with Interceptor that handles Cookies, I was unable to do it.

Can you guys suggest what else could be done?

Here is my pipeline.
https://elastic.snaplogic.com/sl/designer.html?pipe_snode=598b5f21a92066355787c461&active_org=Connec...

2 REPLIES 2

tstack
Former Employee

There needs to be a space after the semi-colon in the cookie header:

'JSESSIONID=' + $SessionID + '; ' + $Token

Also, the X-XSRF-TOKEN header should have just the token value and not โ€˜XSRF-TOKEN=โ€œโ€ฆโ€โ€™. I extracted the token like so:

$Token.match(/="(.*)"$/)[1]

The query is also not well-formed, I replaced the JSON.stringify() with:

{"FirstName":$FirstName, "LastName": $LastName}

Hereโ€™s the updated version I was trying on UAT.

NG_Join_Search1_2017_08_10 (1).slp (16.2 KB)

Thank you @tstack

HTTP calls need to be well formed and really crazy about spaces.