Documentation ¶
Index ¶
- Constants
- func DumpResponse(resp *http.Response) error
- func GetBaseURL(req *http.Request) string
- func GetHeaders(keyValues map[string]string) http.Header
- func GetURL(path string, params map[string]string) (*url.URL, error)
- func HasContentType(resp *http.Response, contentType string) bool
- func IsSuccessResponse(resp *http.Response) bool
- func NewRequest(method string, path string, params map[string]string, ...) (*http.Request, error)
- func SetBearerTokenHeader(req *http.Request, token string)
Constants ¶
View Source
const HeaderHost = "Host"
View Source
const HeaderXForwardedFor = "X-Forwarded-For"
View Source
const HeaderXForwardedHost = "X-Forwarded-Host"
Variables ¶
This section is empty.
Functions ¶
func DumpResponse ¶
DumpResponse dumps the body of the specified response to stdout
func GetBaseURL ¶ added in v0.0.72
func HasContentType ¶ added in v0.0.65
func IsSuccessResponse ¶ added in v0.0.65
func NewRequest ¶ added in v0.0.65
func SetBearerTokenHeader ¶
SetBearerTokenHeader sets the Authorization header with the specified bearer token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.