Documentation ¶
Index ¶
- Variables
- func Get(url string) (*http.Response, error)
- func GetWithClient(client *http.Client, url string, headers map[string]string) (*http.Response, error)
- func GetWithHeaders(url string, headers map[string]string) (*http.Response, error)
- func Post(url string, body io.Reader) (*http.Response, error)
- func PostWithClient(client *http.Client, url string, body io.Reader) (*http.Response, error)
- func Put(url string, body io.Reader) (*http.Response, error)
- func PutWithClient(client *http.Client, url string, body io.Reader) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHTTPClient = &http.Client{ Timeout: 3 * time.Second, }
The default HTTP client to use when fetching a URL.
Functions ¶
func GetWithClient ¶
func GetWithClient(client *http.Client, url string, headers map[string]string) (*http.Response, error)
GetWithClient performs a HTTP GET of a URL with custom headers using the supplied HTTP client.
func GetWithHeaders ¶
GetWithHeaders performs a HTTP GET of a URL using the default HTTP client and passing in the supplied headers.
func PostWithClient ¶
PostWithClient performs a HTTP POST to a URL using the supplied body and HTTP client.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.