Documentation ¶
Overview ¶
Package message provides common utilities for working with HTTP messages.
Index ¶
Constants ¶
View Source
const ( HeaderAccept = "Accept" HeaderContentType = "Content-Type" HeaderHost = "Host" )
Header* are common header keys or values.
View Source
const ( MIMEApplicationJSON = "application/json" MIMEApplicationXML = "application/xml" MIMETextXML = "text/xml" MIMEGRPC = "application/grpc" )
MIME are common MIME types
View Source
const (
CtxErrors key = "error"
)
Ctx* are context value keys
Variables ¶
This section is empty.
Functions ¶
func WithError ¶
WithError adds the error to the current request. Middleware later picks it out, and writes out the status.
https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/net/http/server.go;l=2141-2150 https://github.com/go-chi/render/blob/14f1cb3d5c2969d6e462632a205eacb6421eb4dc/responder.go#L25-L26
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.