Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MiddlewareChain ¶
func MiddlewareChain(h http.Handler, mw []Middleware) http.Handler
func NormalizeQueryValues ¶
NormalizeQueryValues replaces comma-separated values with individual values
Types ¶
type Middleware ¶
func AcceptEncodingHeaderHandler ¶ added in v6.1.1
func AcceptEncodingHeaderHandler() Middleware
AcceptEncodingHeaderHandler compresses the response before sending it back to the client, if gzip is supported.
func AcceptHeaderHandler ¶
func AcceptHeaderHandler(serverAcceptedTypes []string) Middleware
AcceptHeaderHandler checks if the client's response preference is handled
func ContentTypeHandler ¶
func ContentTypeHandler(acceptedMediaTypes []string) Middleware
ContentTypeHandler checks request for the appropriate media types otherwise returning a http.StatusUnsupportedMediaType error
func CorsHandler ¶
func CorsHandler(allowOrigins []string) Middleware
CorsHandler sets the cors settings on api endpoints
Click to show internal directories.
Click to hide internal directories.