modifying headers cookies in postman or curl does not work, proving that cookies cannot be passed through headers
Must the cookie be a local presence, and what is the process?
Such as
Curl works, and the code that was written earlier is wrong. But postman is still invalid, should be a plugin problem or?
This problem is caused by the postman plugin. I didn't pretend to be a real postman.
The second one is the real postman, the first one should have a bug.
Reply content:
modifying headers cookies in postman or curl does not work, proving that cookies cannot be passed through headers
Must the cookie be a local presence, and what is the process?
Such as
Curl works, and the code that was written earlier is wrong. But postman is still invalid, should be a plugin problem or?
This problem is caused by the postman plugin. I didn't pretend to be a real postman.
The second one is the real postman, the first one should have a bug.
But postman is still invalid, should be a plugin problem or?
Postman is a browser-based plug-in, the request is made by invoking ajax/xmlhttprequest the way, bound by the browser's security restrictions:
- First XMLHttpRequest cross-domain is not supported for security reasons, Postman has already made it clear to the browser that cross-domain permissions are required
- Second, part of the header is also for security reasons, is not set in the browser, subject to the browser's user characteristics
Specific which header can not set, to see XMLHttpRequest.js the source code implementation
var forbiddenRequestHeaders = [ "accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "content-transfer-encoding", "cookie", "cookie2", "date", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "via" ];
The first one is the postman plugin, the second is the postman App
Restricted by the chrome sandbox mechanism, only cookies written by the browser can be transmitted. To bypass the browser, you can only use the Postman App and enable another plugin interceptor. Https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo
But the app is not perfect, and there's no place to delete the cookie value. You can only go back to Chrome to clear all cookies.
You write the cookie format is not correct, the left to fill the cookie, the right should be filled name=value such format
More about Postman App
Http://www.getpostman.com/docs/requests
http://blog.getpostman.com/2014/11/28/using-the-interceptor-to-read-and-write-cookies/