Documentation
¶
Index ¶
- Constants
- func SetAccept(req *http.Request, value string)
- func SetAcceptEventStream(req *http.Request)
- func SetAcceptJSON(req *http.Request)
- func SetBearerAuthorization(req *http.Request, token string)
- func SetContentType(req *http.Request, value string)
- func SetContentTypeJSON(req *http.Request)
- func SetUserAgent(req *http.Request, userAgent string)
Constants ¶
View Source
const ( HeaderUserAgent = "User-Agent" HeaderAuthorization = "Authorization" HeaderAccept = "Accept" HeaderContentType = "Content-Type" MediaTypeJSON = "application/json" MediaTypeEventStream = "text/event-stream" BearerAuthorizationPrefix = "Bearer " )
Variables ¶
This section is empty.
Functions ¶
func SetAcceptEventStream ¶
SetAcceptEventStream sets the Accept header to text/event-stream.
func SetAcceptJSON ¶
SetAcceptJSON sets the Accept header to application/json.
func SetBearerAuthorization ¶
SetBearerAuthorization sets an Authorization header with a Bearer token.
func SetContentType ¶
SetContentType sets the Content-Type header on the request.
func SetContentTypeJSON ¶
SetContentTypeJSON sets the Content-Type header to application/json.
func SetUserAgent ¶
SetUserAgent sets the User-Agent header on the request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.