I read the manual of sending request with cookie with postman:
As the packaged app runs in a sandbox separately from the browser, it can not access cookies set inside the browser. This restriction can also be overcome using the Interceptor extension. Postman routes all requests through the Interceptor, which then uses the browser context to send requests. Cookies set inside the browser are automatically attached to your requests. Read the original blog post on Interceptor.
Once the interceptor is enabled, you can also send cookies from Postman. Just set the "Cookie" header, and the cookie will be sent with the request. You can also get access to cookies that are available when the response is returned. Check out out blog post for more
So I downloaded the interceptor for google chrome, and it enable.
Also, I add the following to postman: Cookie JSESSIONID=daczcz36789
When I look at the network I notice that the Cookie is not sent.
What I do wrong?
Go to the google.com domain in the manager and click Add Cookie. A new text box will open up where it will have some values already written. Change those values as given in the image below. Now you have added a new cookie to the domain google.com.
To send cookies to the server, you need to add the "Cookie: name=value" header to your request. To send multiple Cookies in one cookie header, you can separate them with semicolons. In this Send Cookies example, we are sending HTTP cookies to the ReqBin echo URL.
The cookies are mentioned under the Headers and Cookies tab in the Response in Postman. To work with Cookies, we have to click on the Cookies link available under the Params tab. On clicking on it, the MANAGE COOKIES appears. It contains all the available cookies along with the options – Add Cookie and Delete.
Go to the Via Interceptor tab of the Capture requests window. Select Capture Cookies if you want to capture cookies in addition to requests during the debug session. You can use these cookies in your Postman requests. You can also capture cookies and sync them to Postman without starting a debug session.
I used the postman chrome extension until it became deprecated. Chrome extension is also less usable and powerful than the native postman application. Hence it became very inconvenient to use the chrome extension.
I have found another approach:
You can enable Interceptor in browser and in Postman separately. For send/recieve cookies you should enable Interceptor in Postman. So if you enable interceptor only in browser - it will not work. Actually you don't need enable Interceptor in browser at all - if you don't want to flood your postman history with unnecessary requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With