Documentation ¶
Index ¶
- func ExecuteRequest(uri string, options ...RequestOption) (*types.HTTPResult, error)
- type RequestOption
- func BearerToken(method string) RequestOption
- func Body(body []byte) RequestOption
- func Cookies(cookies map[string]string) RequestOption
- func Headers(headers map[string]string) RequestOption
- func Method(method string) RequestOption
- func MultiPartForm(data map[string]string, files map[string]types.FileDescriptor) RequestOption
- func OverloadReader(reader overloadReader) RequestOption
- func Proxy(url string) RequestOption
- func Retries(count int) RequestOption
- func Timeout(time time.Duration) RequestOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteRequest ¶
func ExecuteRequest(uri string, options ...RequestOption) (*types.HTTPResult, error)
Types ¶
type RequestOption ¶
type RequestOption interface {
Apply(o *types.RequestOptions)
}
func BearerToken ¶
func BearerToken(method string) RequestOption
func Body ¶
func Body(body []byte) RequestOption
func Cookies ¶
func Cookies(cookies map[string]string) RequestOption
func Headers ¶
func Headers(headers map[string]string) RequestOption
func Method ¶
func Method(method string) RequestOption
func MultiPartForm ¶
func MultiPartForm(data map[string]string, files map[string]types.FileDescriptor) RequestOption
func OverloadReader ¶
func OverloadReader(reader overloadReader) RequestOption
func Proxy ¶ added in v1.0.2
func Proxy(url string) RequestOption
func Retries ¶
func Retries(count int) RequestOption
func Timeout ¶
func Timeout(time time.Duration) RequestOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.