'Simulate post request from postman
I am trying to do the post equivalent of the submit button in below page from postman.
https://www.camsonline.com/Investors/Statements/Portfolio-Valuation-Statement
The problem is that the i have put the request params as url-encoded, but the the response I get is different to the one i get from browser.
And because the response is a long string, I am not sure how to decode that. Even the request goes as a json ("data":"loong encoded string").
I am not sure how i can mimic this from postman. Does anyone know how can i decode the response?
Response Headers
HTTP/1.1 200 OK
Server: XXXXXX
Date: Thu, 17 Feb 2022 19:18:57 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: XXXXXXXX
ETag: W/"22e-207ZG0Cy8DpNJWr5iRL1KsPKTsQ"
Access-Control-Allow-Credentials: false
cache-Control: no-store no-cache
Access-Control-Allow-Origin: camsonline.com
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000
X-XSS-Protection: 1; mode=block
Content-Encoding: gzip
content-length: 578
POST /api/v1/camsonline HTTP/1.1
Host: www.camsonline.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
content-type: application/json
Content-Length: 1483
Origin: https://www.camsonline.com
Connection: keep-alive
Referer: https://www.camsonline.com/
Cookie: cookiesession1=XYZ
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Solution 1:[1]
Open your DevTools, select the network call you are interested in, right-click on it, then hit Copy and finally Copy as cURL.
Now open Postman and hit the Import button, then there is an option to paste Raw Text, and finally paste your network call from above which we have copied like in below picture.
You only have to hit the Import button now and you’ll see the request with all its headers, payload, cookies etc. It will be exactly same as we are sending a request from browser.
Note: If you are using proxy, then probably the base url of the API could be different.
Happy debugging!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Abhilash Asokan |


