Is it wrong to modify headers's cookie?

Source: Internet
Author: User

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:

    1. 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

    1. 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"   ];

    1. The first one is the postman plugin, 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 plugin interceptor. Https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo

    3. 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.

    4. 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/

  • 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.