Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONBody ¶
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
DecodeJSONBody will unmarshall a request body into the provided interface type. it will also perform some handy checks on our request to ensure it follows a format we are expecting. big ups @ajmedwards
Types ¶
type MalformedRequest ¶
MalformedRequest is a custom error type that holds a response code and a message
func (*MalformedRequest) Error ¶
func (mr *MalformedRequest) Error() string
Error allows for MalformedRequest to implement the Error interface
Click to show internal directories.
Click to hide internal directories.