-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加公共请求头 setHeaders方法无效 #66
Comments
补充一句 我的是post请求 |
配置Content-type(hashMap.put("Content-Type", "application/json;charset=UTF-8");) 无效 。 |
看了源码header没有设置进去
private Headers buildHeaders(Request request, Map<String, String> headerMap) {
Headers headers = request.headers();
if (headers != null) {
Headers.Builder builder = headers.newBuilder();
for (String key : headerMap.keySet()) {
builder.add(key, headerMap.get(key));
}
return builder.build();
} else {
return headers;
}
}
The text was updated successfully, but these errors were encountered: