mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
!642 HttpBase增加获取bodyBytes储存主体方法
Merge pull request !642 from huang/v5-dev
This commit is contained in:
commit
7f69a03dd0
@ -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…
x
Reference in New Issue
Block a user