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

Rest post snap giving different response from Postman

yash_verma
New Contributor

Hi Team,

I am trying to use rest post snap in my pipeline and getting different response from Postman. Here is my pipeline . Please let me know how can i get the correct output from snap: image
image
image
image
Response from snaplogic . see in bold. Also postman output given below in screenshot :
{
โ€œresponseโ€: {
โ€œstatusLineโ€: {
โ€œprotoVersionโ€: โ€œHTTP/1.1โ€,
โ€œstatusCodeโ€: 200,
โ€œreasonPhraseโ€: โ€œOKโ€
},
โ€œentityโ€: {
*** โ€œsuccessโ€: true,***
*** โ€œresponseโ€: {***
*** โ€œdataโ€: {***
*** โ€œreferenceTokenโ€: โ€œchain_3a17c51e8b8c4a4aeaf3bee2c31bbb79dd210caa44a4cce1f5bfc5a3184e4f9bโ€***
}
}
},
โ€œheadersโ€: {
โ€œx-content-type-optionsโ€: โ€œnosniffโ€,
โ€œstrict-transport-securityโ€: โ€œmax-age=31536000; includeSubDomainsโ€,
โ€œx-download-optionsโ€: โ€œnoopenโ€,
โ€œx-frame-optionsโ€: โ€œdenyโ€,
โ€œconnectionโ€: โ€œkeep-aliveโ€,
โ€œx-permitted-cross-domain-policiesโ€: โ€œnoneโ€,
โ€œx-dns-prefetch-controlโ€: โ€œoffโ€,
โ€œcontent-typeโ€: โ€œapplication/jsonโ€,
โ€œdateโ€: โ€œTue, 13 Oct 2020 07:21:06 GMTโ€,
โ€œreferrer-policyโ€: โ€œno-referrerโ€,
โ€œcontent-lengthโ€: โ€œ128โ€,
โ€œcontent-security-policyโ€: โ€œdefault-src โ€˜selfโ€™โ€,
โ€œcache-controlโ€: โ€œno-cacheโ€,
โ€œx-xss-protectionโ€: โ€œ1; mode=blockโ€,
โ€œfeature-policyโ€: โ€œaccelerometer โ€˜noneโ€™; ambient-light-sensor โ€˜noneโ€™; autoplay โ€˜noneโ€™; camera โ€˜noneโ€™; encrypted-media โ€˜noneโ€™; fullscreen โ€˜noneโ€™; geolocation โ€˜noneโ€™; gyroscope โ€˜noneโ€™; magnetometer โ€˜noneโ€™; microphone โ€˜noneโ€™; midi โ€˜noneโ€™; payment โ€˜noneโ€™; picture-in-picture โ€˜noneโ€™; speaker โ€˜noneโ€™; usb โ€˜noneโ€™; vibrate โ€˜noneโ€™; vr โ€˜noneโ€™โ€
}
},
โ€œoriginalโ€: {
โ€œheaderโ€: {
โ€œAcceptโ€: โ€œapplication/jsonโ€,
โ€œAUTHORIZATIONโ€: โ€œE799ED4CF2455AB6BB2E439CD7C0C6D3:Bv5Z+TVdrVsSH8oR9EvebSKBUAL6vHksGegBQdjbpTg=โ€,
โ€œContent-Typeโ€: โ€œapplication/jsonโ€,
โ€œ$โ€: {
โ€œX-ALTR-TIMEโ€: โ€œ2020-10-13T07:20:27.969Zโ€
}
},
โ€œbodyโ€: {
โ€œempidโ€: โ€œ1โ€,
โ€œnameโ€: โ€œYashโ€,
โ€œemailโ€: โ€œyash.verma@gmail.comโ€
},
โ€œurlโ€: {
โ€œurlโ€: โ€œhttps://dgl.preview.hhhh.com/api/v1/singleโ€
}
}
},

Postman Response :
image

1 REPLY 1

dimche_saveski
New Contributor III

Hi @yash.verma

Can you please, tell more details about your payload and settings of Postman
The same payload , same url, returns correct response from Postman, but not at your rest post snapโ€ฆ Try with removing the JSON.stringify() function from the HTTP entity field.

BR
Dimche