Documentation
¶
Overview ¶
Package response provides simple HTTP handlers for common responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisabledHandler ¶
DisabledHandler is a middleware handler that returns an HTTP 503 (Service unavailable) error if 'disabled' is true. Otherwise it serves 'next'.
func NotImplementedHandler ¶
NotImplementedHandler returns an `http.Handler` that responds with an HTTP 501 (Not Implemented) error.
func NullHandler ¶
NullHandler returns an `http.Handler` that does nothing, resulting in an empty HTTP 200 response.
func PingHandler ¶
PingHandler returns an `http.Handler` that responds with an HTTP 204 (No Content) status. If 'response' is not empty it is sent in the `X-ping` response header.
func PingPongHandler ¶
PingPongHandler returns an `http.Handler` equivalent to `PingHandler` with a response value of "PONG".
Types ¶
This section is empty.