Documentation
¶
Overview ¶
Package decorators contains general-purpose HTTP handler decorators
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTMLHeaders ¶
func HTMLHeaders(h http.HandlerFunc) http.HandlerFunc
HTMLHeaders adds the Content-Type text/html header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.
func JSONHeaders ¶
func JSONHeaders(h http.HandlerFunc) http.HandlerFunc
JSONHeaders adds the Content-Type application/json header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.
func TextPlainHeaders ¶
func TextPlainHeaders(h http.HandlerFunc) http.HandlerFunc
TextPlainHeaders adds the Content-Type text/plain header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.