Documentation ¶ Index ¶ Constants func Payload(r *http.Request, value interface{}) error type Error func (e Error) Error() string func (e Error) String() string type ErrorCode Constants ¶ View Source const ( UnsupportedMediaType = ErrorCode(1) MalformedInput = ErrorCode(2) ) Variables ¶ This section is empty. Functions ¶ func Payload ¶ func Payload(r *http.Request, value interface{}) error Payload parses a request body, depending on the type set in Content-Type found in the headers. If no Content-Type is set in the headers, Payload will try to parse content from sent Form values. Types ¶ type Error ¶ type Error struct { Message string Code ErrorCode } func (Error) Error ¶ func (e Error) Error() string func (Error) String ¶ func (e Error) String() string type ErrorCode ¶ type ErrorCode int Source Files ¶ View all Source files request.go Click to show internal directories. Click to hide internal directories.