Documentation
¶
Overview ¶
Package protocol holds the protocol and format names shared by the production code and the tests: HTTP header names, media types, the names of the supported configuration formats and network names.
The package only declares constants. Use the net/http constants for the HTTP methods and status codes instead of redeclaring them here.
Index ¶
Constants ¶
const ( // FormatCSV is the name of the CSV format. FormatCSV = "csv" // FormatJSON is the name of the JSON format. FormatJSON = "json" // FormatTOML is the name of the TOML format. FormatTOML = "toml" // FormatYAML is the name of the YAML format. FormatYAML = "yaml" )
Names of the configuration and export formats.
const ( // HeaderAuthorization is the name of the header carrying the credentials of a request. HeaderAuthorization = "Authorization" // HeaderContentType is the name of the header carrying the media type of a body. HeaderContentType = "Content-Type" // HeaderETag is the name of the header carrying the entity tag of a response. HeaderETag = "ETag" // HeaderIfNoneMatch is the name of the header carrying the entity tag a client already holds. HeaderIfNoneMatch = "If-None-Match" // HeaderOrigin is the name of the header carrying the origin of a cross-origin request. HeaderOrigin = "Origin" )
HTTP header names.
const ( // BearerPrefix is the scheme prefix of an Authorization header carrying a bearer token. BearerPrefix = "Bearer " // MIMEApplicationJSON is the media type of a JSON body. MIMEApplicationJSON = "application/json" )
const NetworkTCP = "tcp"
NetworkTCP is the name of the TCP network, as accepted by net.Listen and net.Dial.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.