hutool-http链式调用参数丢失

kyaa111 3年前 ⋅ 1165 阅读

版本hutool-http-5.2.5

如下代码,pathParams的参数会丢失

 HttpRequest request = 
 cn.hutool.http.HttpUtil.createRequest(method, url).timeout(TIMEOUT)
                .form(pathParams).body(body).header(TOKEN_HEADER, TOKEN);

需要将form后移

 HttpRequest request = 
 cn.hutool.http.HttpUtil.createRequest(method, url).timeout(TIMEOUT)
                .body(body).form(pathParams).header(TOKEN_HEADER, TOKEN);