String returns the body string in response. it calls Response inner.
()
| 370 | // String returns the body string in response. |
| 371 | // it calls Response inner. |
| 372 | func (r *Request) String() (string, error) { |
| 373 | data, err := r.Bytes() |
| 374 | if err != nil { |
| 375 | return "", err |
| 376 | } |
| 377 | |
| 378 | return string(data), nil |
| 379 | } |
| 380 | |
| 381 | // Bytes returns the body []byte in response. |
| 382 | // it calls Response inner. |