This commit is contained in:
Looly 2022-06-08 10:00:01 +08:00
parent a7dcd4ce98
commit 7d3f80fbb0
2 changed files with 10 additions and 0 deletions

View File

@ -333,6 +333,15 @@ public abstract class HttpBase<T> {
return (T) this;
}
/**
* 获取bodyBytes存储字节码
*
* @return byte[]
*/
public byte[] bodyBytes() {
return this.bodyBytes;
}
@Override
public String toString() {
final StringBuilder sb = StrUtil.builder();

View File

@ -249,6 +249,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
*
* @return byte[]
*/
@Override
public byte[] bodyBytes() {
sync();
return this.bodyBytes;