mirror of
https://gitee.com/dromara/hutool.git
synced 2025-06-28 13:34:09 +08:00
fix: 1.HttpBase增加获取bodyBytes储存主体方法(修复使用HttpRequest拦截器时无法获取到bodyBytes主体)
This commit is contained in:
parent
1c6bdf67e0
commit
6f1a8d4214
@ -297,6 +297,15 @@ public abstract class HttpBase<T> {
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取bodyBytes存储字节码
|
||||
*
|
||||
* @return byte[]
|
||||
*/
|
||||
public byte[] bodyBytes() {
|
||||
return this.bodyBytes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回字符集
|
||||
*
|
||||
|
@ -249,6 +249,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
|
||||
*
|
||||
* @return byte[]
|
||||
*/
|
||||
@Override
|
||||
public byte[] bodyBytes() {
|
||||
sync();
|
||||
return this.bodyBytes;
|
||||
|
Loading…
Reference in New Issue
Block a user