BodyGunzipWithLimit returns un-gzipped body data and limits the size of uncompressed body data to maxBodySize bytes. If maxBodySize <= 0, then no limit is applied.
(maxBodySize int)
| 518 | // |
| 519 | // If maxBodySize <= 0, then no limit is applied. |
| 520 | func (resp *Response) BodyGunzipWithLimit(maxBodySize int) ([]byte, error) { |
| 521 | return gunzipData(resp.Body(), maxBodySize) |
| 522 | } |
| 523 | |
| 524 | func gunzipData(p []byte, maxBodySize int) ([]byte, error) { |
| 525 | var bb bytebufferpool.ByteBuffer |
no test coverage detected