# Functions
BufferedStream sets whether the HTTP response body is left open, allowing it to be read from later.
ClientAfter adds one or more ClientResponseFuncs, which are applied to the incoming HTTP response prior to it being decoded.
ClientBefore adds one or more RequestFuncs to be applied to the outgoing HTTP request before it's invoked.
ClientFinalizer adds one or more ClientFinalizerFuncs to be executed at the end of every HTTP request.
DefaultErrorEncoder writes the error to the ResponseWriter, by default a content type of text/plain, a body of the plain text of the error, and a status code of 500.
EncodeJSONRequest is an EncodeRequestFunc that serializes the request as a JSON object to the Request body.
EncodeJSONResponse is a EncodeResponseFunc that serializes the response as a JSON object to the ResponseWriter.
EncodeXMLRequest is an EncodeRequestFunc that serializes the request as a XML object to the Request body.
NewClient constructs a usable Client for a single remote method.
NewExplicitClient is like NewClient but uses a CreateRequestFunc instead of a method, target URL, and EncodeRequestFunc, which allows for more control over the outgoing HTTP request.
NewServer constructs a new server, which implements http.Handler and wraps the provided endpoint.
NopRequestDecoder is a DecodeRequestFunc that can be used for requests that do not need to be decoded, and simply returns nil, nil.
PopulateRequestContext is a RequestFunc that populates several values into the context from the HTTP request.
ServerAfter functions are executed on the HTTP response writer after the endpoint is invoked, but before anything is written to the client.
ServerBefore functions are executed on the HTTP request object before the request is decoded.
ServerErrorEncoder is used to encode errors to the http.ResponseWriter whenever they're encountered in the processing of a request.
ServerErrorHandler is used to handle non-terminal errors.
ServerErrorLogger is used to log non-terminal errors.
ServerFinalizer is executed at the end of every HTTP request.
SetClient sets the underlying HTTP client used for requests.
SetContentType returns a ServerResponseFunc that sets the Content-Type header to the provided value.
SetRequestHeader returns a RequestFunc that sets the given header.
SetResponseHeader returns a ServerResponseFunc that sets the given header.
# Constants
ContextKeyRequestAccept is populated in the context by PopulateRequestContext.
ContextKeyRequestAuthorization is populated in the context by PopulateRequestContext.
ContextKeyRequestHost is populated in the context by PopulateRequestContext.
ContextKeyRequestMethod is populated in the context by PopulateRequestContext.
ContextKeyRequestPath is populated in the context by PopulateRequestContext.
ContextKeyRequestProto is populated in the context by PopulateRequestContext.
ContextKeyRequestReferer is populated in the context by PopulateRequestContext.
ContextKeyRequestRemoteAddr is populated in the context by PopulateRequestContext.
ContextKeyRequestURI is populated in the context by PopulateRequestContext.
ContextKeyRequestUserAgent is populated in the context by PopulateRequestContext.
ContextKeyRequestXForwardedFor is populated in the context by PopulateRequestContext.
ContextKeyRequestXForwardedProto is populated in the context by PopulateRequestContext.
ContextKeyRequestXRequestID is populated in the context by PopulateRequestContext.
ContextKeyResponseHeaders is populated in the context whenever a ServerFinalizerFunc is specified.
ContextKeyResponseSize is populated in the context whenever a ServerFinalizerFunc is specified.
# Interfaces
Headerer is checked by DefaultErrorEncoder.
HTTPClient is an interface that models *http.Client.
StatusCoder is checked by DefaultErrorEncoder.
# Type aliases
ClientFinalizerFunc can be used to perform work at the end of a client HTTP request, after the response is returned.
ClientOption sets an optional parameter for clients.
ClientResponseFunc may take information from an HTTP request and make the response available for consumption.
CreateRequestFunc creates an outgoing HTTP request based on the passed request object.
DecodeRequestFunc extracts a user-domain request object from an HTTP request object.
DecodeResponseFunc extracts a user-domain response object from an HTTP response object.
EncodeRequestFunc encodes the passed request object into the HTTP request object.
EncodeResponseFunc encodes the passed response object to the HTTP response writer.
ErrorEncoder is responsible for encoding an error to the ResponseWriter.
RequestFunc may take information from an HTTP request and put it into a request context.
ServerFinalizerFunc can be used to perform work at the end of an HTTP request, after the response has been written to the client.
ServerOption sets an optional parameter for servers.
ServerResponseFunc may take information from a request context and use it to manipulate a ResponseWriter.