Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadHTTPRequest ¶
type BadHTTPRequest struct { Status int // HTTP error reason code Msg string // Description what is wrong }
BadHTTPRequest represents an invalid HTTP request.
func DecodeHTTPJSONBody ¶
func DecodeHTTPJSONBody(w http.ResponseWriter, r *http.Request, to interface{}) *BadHTTPRequest
DecodeHTTPJSONBody JSON decodes the request body into `to`. In case of problems an error is returned. It only accepts request payloads that are smaller than 1MB.
func (*BadHTTPRequest) Error ¶
func (mr *BadHTTPRequest) Error() string
Error returns a brief description what was wrong with the request.
Click to show internal directories.
Click to hide internal directories.