Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions en/digging-deeper/http-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ type Response interface {
Header(name string) string // Get the value of a specific header
Headers() http.Header // Get all response headers
Json() (map[string]any, error) // Decode the response body as JSON into a map
Redirect() bool // Check if the response is a redirect (3xx status code)
ServerError() bool // Check if the status code is in the 5xx range
Status() int // Get the HTTP status code
Successful() bool // Check if the status code is in the 2xx range
Redirect() bool // Check if the response is a redirect (3xx status code)
ServerError() bool // Check if the status code is in the 5xx range
Status() int // Get the HTTP status code
Stream() (io.ReadCloser, error) // Return a ReadCloser allowing the response body to be streamed
Successful() bool // Check if the status code is in the 2xx range

/* status code related methods */

Expand Down
Loading