mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix: 1.HttpBase增加获取bodyBytes储存主体方法(修复使用HttpRequest拦截器时无法获取到bodyBytes主体)
This commit is contained in:
@@ -297,6 +297,15 @@ public abstract class HttpBase<T> {
|
|||||||
return (T) this;
|
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[]
|
* @return byte[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public byte[] bodyBytes() {
|
public byte[] bodyBytes() {
|
||||||
sync();
|
sync();
|
||||||
return this.bodyBytes;
|
return this.bodyBytes;
|
||||||
|
Reference in New Issue
Block a user