response

package
v0.69.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MPL-2.0 Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WasBadRequest added in v0.22.0

func WasBadRequest(resp *http.Response) bool

WasBadRequest returns true if the HttpResponse is non-nil and has a status code of BadRequest

func WasConflict

func WasConflict(resp *http.Response) bool

WasConflict returns true if the HttpResponse is non-nil and has a status code of Conflict

func WasForbidden added in v0.56.0

func WasForbidden(resp *http.Response) bool

WasForbidden returns true if the HttpResponse is non-nil and has a status code of Forbidden

func WasNotFound

func WasNotFound(resp *http.Response) bool

WasNotFound returns true if the HttpResponse is non-nil and has a status code of NotFound

func WasStatusCode added in v0.37.0

func WasStatusCode(resp *http.Response, statusCode int) bool

WasStatusCode returns true if the HttpResponse is non-nil and matches the Status Code It's recommended to use WasBadRequest/WasConflict/WasNotFound where possible instead

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL