ToString returns the response body as string, read body if not have been read.
()
| 231 | |
| 232 | // ToString returns the response body as string, read body if not have been read. |
| 233 | func (r *Response) ToString() (string, error) { |
| 234 | b, err := r.ToBytes() |
| 235 | return string(b), err |
| 236 | } |
| 237 | |
| 238 | // ToBytes returns the response body as []byte, read body if not have been read. |
| 239 | func (r *Response) ToBytes() (body []byte, err error) { |