【问题标题】:Not able to set encoded header in the request to get the token. Error - java.util.zip.ZipException: incorrect header check无法在请求中设置编码标头以获取令牌。错误 - java.util.zip.ZipException:标头检查不正确
【发布时间】:2019-11-29 19:07:08
【问题描述】:

我正在尝试通过以 Header 的形式传递 Base64 编码值来生成令牌,但得到“java.util.zip.ZipException:不正确的标头检查”

RestAssured.baseURI = uri; RequestSpecification request = RestAssured.given(); request = request.header("Authorization", "Basic "+encodedString); Response response = request.when().post();

显示“java.util.zip.ZipException:不正确的标头检查”异常。

【问题讨论】:

    标签: java api automation rest-assured


    【解决方案1】:

    试试

    RestAssured.config = config().decoderConfig(decoderConfig().useNoWrapForInflatedStreams(true));
    

    【讨论】:

      猜你喜欢
      • 2018-10-13
      • 2019-11-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-16
      • 2018-06-29
      • 2017-11-29
      • 2018-07-05
      相关资源
      最近更新 更多