# Functions
ColorizeByStatusCode returns a value colored by an http status code.
ColorizeByStatusCodeWithFormatter returns a value colored by an http status code with a given formatter.
ColorizeStatusCode colorizes a status code.
ColorizeStatusCodeWithFormatter colorizes a status code with a given formatter.
DecodeBasicAuth pulls a basic auth header from a request and returns the username and password that were passed.
DeserializeReaderAsJSON deserializes a post body as json to a given object.
DetectContentType generates the content type of a given file by path.
ErrIsInvalidSameSite returns if an error is `ErrInvalidSameSite`.
ErrIsInvalidSplitColonInput returns if an error is `ErrInvalidSplitColonInput`.
ErrIsParameterMissing returns if an error is `ErrParameterMissing`.
ErrIsUnauthorized returns if an error is `ErrUnauthorized`.
ETag creates an etag for a given blob.
FormatHeaders formats headers for output.
GetContentEncoding gets the content type out of a header collection.
GetContentType gets the content type out of a header collection.
GetHost returns the request host, omitting the port if specified.
GetHostStrict returns the request host, omitting the port if specified, and does not consider `X-Forwarded-Host` headers.
GetPort returns the port for a given request.
GetProto gets the request proto.
GetRemoteAddr gets the origin/client ip for a request.
GetUserAgent gets a user agent from a request.
HeaderAny returns if any pieces of a header match a given value.
HeaderLastValue returns the last value of a potential csv of headers.
Headers creates headers from a given map.
HostHasPort returns true if a string is in the form "host:port", or "[ipv6::address]:port".
HTTPLogged returns a middleware that logs a request.
HTTPSRedirectFunc redirects HTTP to HTTPS as an http.HandlerFunc.
IsHTTPTokenRune returns if a rune is in the http valid rune table.
IsValidMethod returns if a http method is valid.
LocalIP returns the local server ip.
MustParseSameSite parses a string value for same site and panics on error.
MustParseURL parses a url and panics if there is an error.
NestMiddleware nests middleware steps.
NewCertInfo returns a new cert info.
NewEventSource returns a new event source.
NewGracefulHTTPServer returns a new graceful http server wrapper.
NewGZipResponseWriter returns a new gzipped response writer.
NewHTTPRequestEvent is an event representing a request to an http server.
NewHTTPRequestEventFilter returns a new http request event filter.
NewHTTPRequestEventListener returns a new web request event listener.
NewMockRequest creates a mock request.
NewMockRequestWithCookie creates a mock request with a cookie attached to it.
NewMockResponse returns a mocked response writer.
NewStatusResponseWriter creates a new response writer.
NoFollowRedirects returns an http client redirect delegate that returns the http.ErrUseLastResponse error.
OptBasicAuth is an option that sets the http basic auth.
OptBody sets the post body on the request.
OptBodyBytes sets a body on a context from bytes.
OptContext sets the request context.
OptCookie adds a cookie to a context.
OptCookieValue adds a cookie value to a context.
OptDelete sets the request method.
OptDialKeepAlive sets the dial keep alive duration.
OptDialTimeout sets the dial timeout.
OptGet sets the request method.
OptGracefulHTTPServerListener sets the server listener.
OptGracefulHTTPServerLog sets the logger.
OptGracefulHTTPServerShutdownGracePeriod sets the shutdown grace period.
OptHeader sets the request headers.
OptHeaderValue sets a header value on a request.
OptHTTPClientTrace sets the http trace on the outgoing request.
OptHTTPRequestContentEncoding sets a field.
OptHTTPRequestContentLength sets a field.
OptHTTPRequestContentType sets a field.
OptHTTPRequestElapsed sets a field.
OptHTTPRequestHeader sets a field.
OptHTTPRequestRequest sets a field.
OptHTTPRequestRoute sets a field.
OptHTTPRequestStatusCode sets a field.
OptHTTPServerAddr mutates a http server.
OptHTTPServerBaseContext sets the base context for requests to a given server.
OptHTTPServerErrorLog sets the error log.
OptHTTPServerHandler mutates a http server.
OptHTTPServerIdleTimeout mutates a http server.
OptHTTPServerMaxHeaderBytes mutates a http server.
OptHTTPServerReadHeaderTimeout mutates a http server.
OptHTTPServerReadTimeout mutates a http server.
OptHTTPServerTLSConfig mutates a http server.
OptHTTPServerWriteTimeout mutates a http server.
OptJSONBody sets the post body on the request.
OptMethod sets the request method.
OptPatch sets the request method.
OptPost sets the request method.
OptPostedFiles sets a body from posted files.
OptPostedFilesMaxMemory sets the max memory for the posted files options (defaults to 64mb).
OptPostedFilesParseForm sets if we should parse the post form for files (defaults to false).
OptPostedFilesParseMultipartForm sets if we should parse the multipart form for files (defaults to true).
OptPostForm sets the request post form and the content type.
OptPostFormValue sets a request post form value.
OptPut sets the request method.
OptQuery sets the full querystring.
OptQueryValue sets a query value on a request.
OptQueryValueAdd adds a query value on a request.
OptXMLBody sets the post body on the request.
ParseCertInfo returns a new cert info from a response from a check.
ParseSameSite parses a string value for same site.
PortFromBindAddr returns a port number as an integer from a bind addr.
PostedFiles returns any files posted to the request.
RemoveHostEmptyPort strips the empty port in ":port" to "" as mandated by RFC 3986 Section 6.2.3.
SchemeIsSecure returns if a given scheme is secure.
SplitColon splits a string on a **single** colon.
TLSSecureCipherSuites sets the tls config to use secure cipher suites.
URLWithHost returns a copy url with a given host.
URLWithPath returns a copy url with a given path.
URLWithPort returns a copy url with a given pprt attached to the host.
URLWithQuery returns a copy url with a given raw query.
URLWithRawQuery returns a copy url with a given raw query.
URLWithScheme returns a copy url with a given scheme.
WithClientHTTPTrace adds the http client trace to the request.
WriteJSON marshalls an object to json.
WriteNoContent writes http.StatusNoContent for a request.
WriteRawContent writes raw content for the request.
WriteXML marshalls an object to json.
# Constants
ConnectionClose is the connection value of "close".
ConnectionKeepAlive is a value for the "Connection" header and indicates the server should keep the tcp connection open after the last byte of the response is sent.
ContentEncodingGZIP is the gzip (compressed) content encoding.
ContentEncodingIdentity is the identity (uncompressed) content encoding.
ContentTypeApplicationFormEncoded is a content type header value.
ContentTypeApplicationJSON is a content type for JSON responses.
ContentTypeApplicationOctetStream is a content type header value.
ContentTypeApplicationXML is a content type header value.
ContentTypeHTML is a content type for html responses.
ContentTypeText is a content type for text responses.
ContentTypeXML is a content type for XML responses.
64mb.
Errors.
Errors.
Errors.
Errors.
Errors.
Logger flags.
HSTS Cookie Fields.
HSTS Cookie Fields.
HSTS Cookie Fields.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
HTTP Method constants (also referred to as 'verbs')
They are aliases for the constants in net/http at this point.
SameSite prevents the browser from sending this cookie along with cross-site requests.
SameSite prevents the browser from sending this cookie along with cross-site requests.
SameSite prevents the browser from sending this cookie along with cross-site requests.
Well known schemes.
Well known schemes.
Well known schemes.
TestURL can be used in tests for the URL passed to requests.
# Variables
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
Header names in canonical form.
KnownExtenions are known extenions mapped to their content types.
# Structs
CertInfo is the information for a certificate.
EventSource is a helper for writing event source info.
GracefulHTTPServer is a wrapper for an http server that implements the graceful interface.
GZipResponseWriter is a response writer that compresses output.
HTTPRequestEvent is an event type for http requests.
HTTPTrace is timing information for the full http call.
MockResponseWriter is an object that satisfies response writer but uses an internal buffer.
PostedFile is a file that has been posted to an hc endpoint.
PostedFilesOptions are options for the PostedFiles function.
StatusResponseWriter a better response writer.
TCPKeepAliveListener sets TCP keep-alive timeouts on accepted connections.
Webhook is a configurable request.
# Interfaces
HTTPTraceFinisher is a simplified version of `TraceFinisher`.
HTTPTracer is a simplified version of `Tracer` intended for a raw `(net/http).Request`.
ResponseWriter is a response writer that also returns the written status.
# Type aliases
DialOption is a mutator for a net.Dialer.
GracefulHTTPServerOption is an option for the graceful http server.
HTTPRequestEventOption is a function that modifies an http request event.
HTTPServerOption is a mutator for an http server.
Middleware is a wrapping function that takes a handler and returns a handler.
PostedFileOption mutates posted file options.
RequestOption is an option for http.Request.
RequestOptions are an array of RequestOption.