Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDecoderNotFound is returned when a reuqest doesn't have // enough information to determine a decoder ErrDecoderNotFound = errors.New("decoder could not be found") // JSONDecoder decodes data from a http.Request JSONDecoder = func(r io.Reader) Decoder { return json.NewDecoder(r) } // XMLDecoder decodes data from a http.Request XMLDecoder = func(r io.Reader) Decoder { return xml.NewDecoder(r) } // FormDecoder decodes data from a http.Request FormDecoder = func(r io.Reader) Decoder { return &formDecoder{r: r} } )
Functions ¶
Types ¶
type Decoder ¶
type Decoder interface {
Decode(v interface{}) error
}
Decoder is an interface that decodes http.Request.Body from their Content-Type mime types.
func RequestDecoder ¶
RequestDecoder returns a decoder for a given http.Request
Click to show internal directories.
Click to hide internal directories.