【问题标题】:Postman Bad Request - Request Too Long邮递员错误请求 - 请求太长
【发布时间】:2021-07-01 01:31:24
【问题描述】:

我正在将 Asp.Net Core 3.1 API 与 Identity Server 一起使用,并且我长期以来一直使用 Postman 作为 API 测试器,它运行良好,但是,在版本更新到 8.+.+ 后,Postman 向我返回了这个错误:

<HEAD>
    <TITLE>Bad Request</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii">
</HEAD>

<BODY>
    <h2>Bad Request - Request Too Long</h2>
    <hr>
    <p>HTTP Error 400. The size of the request headers is too long.</p>
</BODY>

我输入了标题 key (Content-Type) 和 value (application/json) 并且授权是 bearer 令牌的类型身体空虚。

我遵循了很多问题来解决这个问题,如下所述:

如何解决 Postman(错误请求 - 请求太长)问题?

【问题讨论】:

    标签: api asp.net-core postman identityserver3


    【解决方案1】:

    经过大量研究,从 Postman 应用程序中删除 cookie 的方法非常简单,如下所示:

    然后删除cookies如下图:

    现在尝试应用请求,它应该可以工作,但是,这只是临时解决方案,我希望 Postman 团队或其他人能提供完整的解决方案。

    【讨论】:

      猜你喜欢
      • 2018-08-09
      • 2020-09-24
      • 2018-07-22
      • 1970-01-01
      • 1970-01-01
      • 2018-07-07
      • 1970-01-01
      • 2014-08-23
      • 2018-02-16
      相关资源
      最近更新 更多