Documentation
¶
Overview ¶
Package headers provides constants for common HTTP header names and values.
Use this package to reference standard HTTP headers in a type-safe manner without relying on string literals. This helps prevent typos and provides consistent header usage across the codebase.
The package defines header keys, like Content-Type, along with common header values, like application/json.
Index ¶
Constants ¶
View Source
const ( // Allow lists the set of methods supported by a resource. Allow = "Allow" // ContentLength indicates the size of the message body, in bytes, sent to the recipient. ContentLength = "Content-Length" // ContentType indicates the media type of the data being sent. ContentType = "Content-Type" // TransferEncoding specifies the form of encoding used to transfer the payload body to the caller. TransferEncoding = "Transfer-Encoding" )
Header keys.
View Source
const ( // ContentTypeApplicationJSON indicates that the body of the HTTP request or response contains JSON. ContentTypeApplicationJSON = "application/json" // TransferEncodingChunked allows data to be sent in a series of chunks without specifying the total size beforehand. TransferEncodingChunked = "chunked" )
Header values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.