Is it wrong to modify the Cookie of headers?

Source: Internet
Author: User
Modifying the headers cookie in postman or curl does not work. Does it prove that the cookie cannot be passed through headers? Must the passed cookie exist locally, what is this process? For example, curl works, and the code written earlier is incorrect. But postman is still invalid. It should be...

Modifying headers cookies in postman or curl does not work, proving that Cookies cannot be passed through headers.
So must the passed cookie exist locally? What is the process?

For example

Curl works. The code written earlier is incorrect. But postman is still invalid. Should it be a plug-in problem or?

This problem is caused by the postman plug-in. What I installed earlier should not be a real postman.

The second is the real postman, and the first is a bug.

Reply content:

Modifying headers cookies in postman or curl does not work, proving that Cookies cannot be passed through headers.
So must the passed cookie exist locally? What is the process?

For example

Curl works. The code written earlier is incorrect. But postman is still invalid. Should it be a plug-in problem or?

This problem is caused by the postman plug-in. What I installed earlier should not be a real postman.

The second is the real postman, and the first is a bug.

But postman is still invalid. Should it be a plug-in problem or?

Postman is a browser-based plug-in that sends requests by callingajax/xmlhttprequestThis method is bound to browser security restrictions:

  1. First, XMLHttpRequest does not support cross-origin for security reasons. postman has declared to the browser that cross-origin permissions are required.

  1. Secondly, some headers cannot be set in the browser due to security reasons, and are subject to the user features of the browser.

Which headers cannot be set?XMLHttpRequest.jsSource 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"   ];

  1. The first is the Postman plug-in, and the second is the Postman App.

  2. 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 plug-in Interceptor. Https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo

  3. However, this App is still incomplete and the Cookie value cannot be found .. You can only clear all cookies in Chrome ..

  4. The Cookie format you wrote is not correct either. Enter the Cookie on the left and the name = value on the right.

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.