Status returns the response status as a string.
()
| 80 | |
| 81 | // Status returns the response status as a string. |
| 82 | func (r *Response) Status() string { |
| 83 | var b strings.Builder |
| 84 | if r != nil { |
| 85 | b.WriteString(strconv.Itoa(r.StatusCode)) |
| 86 | b.WriteString(" ") |
| 87 | b.WriteString(http.StatusText(r.StatusCode)) |
| 88 | } |
| 89 | return b.String() |
| 90 | } |
| 91 | |
| 92 | // IsError returns true when the response status indicates failure. |
| 93 | func (r *Response) IsError() bool { |