Documentation ¶
Index ¶
- Variables
- func GetWithAuth(ctx context.Context, url, auth string) (*http.Response, error)
- func GetWithContext(ctx context.Context, url string) (*http.Response, error)
- func GetWithHeader(ctx context.Context, url string, header http.Header) (*http.Response, error)
- func PostForValues(_url, contentType string, body io.Reader) (url.Values, error)
- func Put(ctx context.Context, url string, contentType string, body io.Reader) (*http.Response, error)
- func RemoveQueryParam(qurl string) string
- type Header
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = newClient().StandardClient()
Functions ¶
func GetWithHeader ¶
func PostForValues ¶
PostForValues issues a POST to the specified URL and returns the response body as url.Values.
func Put ¶
func Put(ctx context.Context, url string, contentType string, body io.Reader) (*http.Response, error)
Put issues a PUT to the specified URL.
Caller should close resp.Body when done reading from it.
If the provided body is an io.Closer, it is closed after the request.
To set custom headers, use NewRequest and DefaultClient.Do.
See the Client.Do method documentation for details on how redirects are handled.
func RemoveQueryParam ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.