Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &binaryUnmarshaler{}
Default is the default response unmarshaler.
Functions ¶
func Register ¶
func Register(um ResponseUnmarshaler) error
Register registers the response unmarshaler to the registry.
Types ¶
type ResponseUnmarshaler ¶
type ResponseUnmarshaler interface { MediaType() string Unmarshal(data []byte, v interface{}) error }
ResponseUnmarshaler is the interface that unmarshals the HTTP response body.
func Get ¶
func Get(mediaType string) ResponseUnmarshaler
Get returns the response unmarshaler for the given media type.
If the unmarshaler is not found, returns the Default.
Click to show internal directories.
Click to hide internal directories.