简体   繁体   English

在 Postman 中设置 ':authority' 标头

[英]Set ':authority' header in Postman

I'm currently trying to replicate a https request with the following headers.我目前正在尝试使用以下标头复制 https 请求。

在此处输入图像描述

The authentication is based on a Session Cookie.身份验证基于会话 Cookie。 However, there is also a header field called :authority , which I'm not able to replicate in Postman.但是,还有一个名为:authority的标头字段,我无法在 Postman 中复制它。

在此处输入图像描述

Also, couldn't I find any solution for that problem or what exactly the :authority header means on the Internet.另外,我不能找到任何解决该问题的方法或:authority标头在 Internet 上的确切含义。 This header seems to be required, as I'm getting a 400 error code back as soon as I send my replicated request.这个标头似乎是必需的,因为我一发送复制的请求就会收到 400 错误代码。

在此处输入图像描述

I've proxied the request sent from Postman and can confirm that the only difference at the first glance is the missing :authority header.我已经代理了从 Postman 发送的请求,并且可以确认乍一看唯一的区别是缺少:authority标头。 Thanks ^^谢谢^^

Alright, taking a closer look at the Raw Request, I noticed that the actual header is called Host and is mapped in the UI to :autority .好吧,仔细看看Raw请求,我注意到实际的标头称为Host并在 UI 中映射到:autority Now its working.现在它的工作。 cheers干杯

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM