Documentation ¶
Overview ¶
Package http contains middleware and utility functions to modify HTTP requests and responses.
Index ¶
Constants ¶
View Source
const XHttpCode = "x-http-code"
XHttpCode is used to set the header for the response HTTP code.
Variables ¶
This section is empty.
Functions ¶
func CustomHTTPErrorHandler ¶
func CustomHTTPErrorHandler(ctx context.Context, w http.ResponseWriter, r *http.Request, err *errors.EncodedError)
CustomHTTPErrorHandler handles custom error objects in the context of HTTP requests. It is similar to runtime.DefaultHTTPErrorHandler but accepts an *errors.EncodedError object.
func HTTPResponseModifier ¶
HTTPResponseModifier is a helper function designed to modify the status code in the context of HTTP responses.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.