Documentation ¶
Index ¶
- func ContentTypeHandler(ctx *context.Context, h http.Handler) http.Handler
- func DelayHandler(ctx *context.Context, h http.Handler) http.Handler
- func EncodeAsJSON(r *http.Request, prettyPrint bool) ([]byte, error)
- func FailureSimulationHandler(ctx *context.Context, h http.Handler) http.Handler
- func JSONRequestLoggingHandler(ctx *context.Context, h http.Handler) http.Handler
- func ProxyHandler(ctx *context.Context, h http.Handler) http.Handler
- func RawRequestLoggingHandler(ctx *context.Context, h http.Handler) http.Handler
- func ResponseCodeHandler(ctx *context.Context, h http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentTypeHandler ¶ added in v1.0.0
ContentTypeHandler will set the correct content type for the HTTP response
func DelayHandler ¶
DelayHandler returns a handler function that introduces a delay in responding to the HTTP request
func FailureSimulationHandler ¶
FailureSimulationHandler returns a handler function that simulates a transient HTTP failure scenario, e.g. a series of failure response codes followed by a series of successful HTTP status codes
func JSONRequestLoggingHandler ¶
JSONLoggingHandler returns a handler function that logs the incoming HTTP request in a compact or formatted JSON format
func ProxyHandler ¶
ProxyHandler returns a handler function that forwards the incoming HTTP request to an upstream HTTP service
func RawRequestLoggingHandler ¶
RawRequestLoggingHandler returns a handler function that logs the incoming HTTP request in plain text format
Types ¶
This section is empty.