Categorygithub.com/alxarch/httperr
modulepackage
0.0.0-20190718123259-527f111510dd
Repository: https://github.com/alxarch/httperr.git
Documentation: pkg.go.dev

# README

httperr

HTTP errors gor Golang

# Functions

BadRequest creates an HTTP 500 error.
Errorf creates a new HTTP error by formating a message.
FromResponse creates a new HTTP error from a response.
InternalServerError creates an HTTP 500 error.
IsClientError checks if code is HTTP client error.
IsError checks if code is any HTTP error code.
IsInformational checks if code is HTTP informational code.
IsRedirect checks if code is HTTP redirect.
IsServerError checks if code is HTTP server error.
IsSuccess checks if code is HTTP success code.
MethodNotAllowed creates an HTTP 405 error.
New creates a new HTTP error.
NotFound creates an HTTP 404 error.
RespondJSON sends a JSON encoded HTTP response.

# Structs

Response is a response message.

# Interfaces

StatusCoder returns an HTTP status code.