Documentation
¶
Index ¶
- type Response
- func BasicHttpRequest(httpMethod string, url string) (Response, error)
- func BasicHttpRequestReturnStruct(httpMethod string, url string, target interface{}) (Response, error)
- func HttpRequest(httpMethod string, url string, headers map[string][]string, ...) (Response, error)
- func HttpRequestReturnStruct(httpMethod string, url string, headers map[string][]string, ...) (Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
func BasicHttpRequest ¶
BasicHttpRequest makes a request with default parameters
func BasicHttpRequestReturnStruct ¶
func BasicHttpRequestReturnStruct(httpMethod string, url string, target interface{}) (Response, error)
BasicHttpRequestReturnStruct makes a request with default parameters
func HttpRequest ¶
func HttpRequest(httpMethod string, url string, headers map[string][]string, cacheTTLOverride time.Duration, allowCacheUpdate bool) (Response, error)
HttpRequest sends an HTTP request to the specified URL and returns the HTTP response. The response is cached for a duration specified by cacheTTL. If cacheTTLOverride is zero, the default cache TTL value is used.
func HttpRequestReturnStruct ¶
func HttpRequestReturnStruct(httpMethod string, url string, headers map[string][]string, cacheTTLOverride time.Duration, allowCacheUpdate bool, target interface{}) (Response, error)
HttpRequestReturnStruct is the same as HttpRequest but it returns the result as a specified struct. HttpRequest sends an HTTP request to the specified URL and returns the HTTP response. The response is cached for a duration specified by cacheTTL. If cacheTTLOverride is zero, the default cache TTL value is used.