mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
!655 ResponseInterceptor拦截器解密场景无法重新给bodyBytes赋值
Merge pull request !655 from huang/v5-master
This commit is contained in:
commit
35a21ed2cc
@ -255,6 +255,21 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
|
||||
return this.bodyBytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置主体字节码<br>
|
||||
* 需在此方法调用前使用charset方法设置编码,否则使用默认编码UTF-8
|
||||
*
|
||||
* @param bodyBytes 主体
|
||||
* @return this
|
||||
*/
|
||||
public HttpResponse body(byte[] bodyBytes) {
|
||||
sync();
|
||||
if (null != bodyBytes) {
|
||||
this.bodyBytes = bodyBytes;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取响应主体
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user