Documentation
¶
Overview ¶
Package http implements cancellable REST requests with custom User-Agent.
Index ¶
Constants ¶
View Source
const (
StatusOK = 200
)
Selected HTTP status codes as registered with IANA. See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
AppVersion string
// contains filtered or unexported fields
}
A Client is an HTTP client.
func (*Client) Get ¶
Get issues a GET to the specified URL with given context and custom User-Agent. It is a replacement for net/http module Get function.
func (*Client) UserAgent ¶
UserAgent constructs User-Agent string in format: `opinions/<version_number> (<os>; +https://github.com/macie/opinions)`.
Click to show internal directories.
Click to hide internal directories.