Documentation
¶
Overview ¶
Package body contains middlewares for manipulating body of a request.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
func JSON(data interface{}) c.Middleware
JSON sets request body to JSON obtained from provided data. string and byte slice will be passed as is. For anything else, JSON encoding will be used. Content-Type header will be set to application/json.
func Reader ¶
func Reader(body io.Reader) c.Middleware
Reader sets request body to contain content from provided reader. Content type header is not set by this middleware.
func XML ¶
func XML(data interface{}) c.Middleware
XML sets request body to XML obtained from provided data. string and byte slice will be passed as is. For anything else, XML encoding will be used. Content-Type header will be set to application/xml.
Types ¶
This section is empty.