Documentation ¶
Index ¶
- func ExecuteOpts(req *http.Request, opts ...Option) error
- func MakeGETRequest(ctx context.Context, httpURL string, opts ...Option) (*http.Request, error)
- func MakeHEADRequest(ctx context.Context, httpURL string, opts ...Option) (*http.Request, error)
- func MakePOSTRequest(ctx context.Context, httpURL string, opts ...Option) (*http.Request, error)
- type HeaderOption
- type Option
- type POSTRawOption
- func NewPOSTFormOption(values url.Values) *POSTRawOption
- func NewPOSTFormOptionFromMap(values map[string]string) *POSTRawOption
- func NewPOSTJSONOption(data []byte, isUTF8 bool) *POSTRawOption
- func NewPOSTJSONOptionFromReader(data io.Reader, length int, isUTF8 bool) *POSTRawOption
- func NewPOSTMultipartOption(writer *gokhttp_multipart.Wrapper) *POSTRawOption
- func NewPOSTRawOption(data io.Reader, contentType string, contentLength int64) *POSTRawOption
- type RawURLParamOption
- type URLParamOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeGETRequest ¶
MakeGETRequest Makes a GET request
func MakeHEADRequest ¶
MakeHEADRequest Makes a HEAD request
Types ¶
type HeaderOption ¶
func NewHeaderOption ¶
func NewHeaderOption(headers http.Header) *HeaderOption
func NewHeaderOptionFromMap ¶
func NewHeaderOptionFromMap(headers map[string]string) *HeaderOption
type POSTRawOption ¶
type POSTRawOption struct { Body io.ReadCloser ContentLength int64 ContentType string }
func NewPOSTFormOption ¶
func NewPOSTFormOption(values url.Values) *POSTRawOption
func NewPOSTFormOptionFromMap ¶
func NewPOSTFormOptionFromMap(values map[string]string) *POSTRawOption
func NewPOSTJSONOption ¶ added in v0.2.6
func NewPOSTJSONOption(data []byte, isUTF8 bool) *POSTRawOption
func NewPOSTJSONOptionFromReader ¶ added in v0.2.6
func NewPOSTJSONOptionFromReader(data io.Reader, length int, isUTF8 bool) *POSTRawOption
func NewPOSTMultipartOption ¶
func NewPOSTMultipartOption(writer *gokhttp_multipart.Wrapper) *POSTRawOption
func NewPOSTRawOption ¶
func NewPOSTRawOption(data io.Reader, contentType string, contentLength int64) *POSTRawOption
type RawURLParamOption ¶
type RawURLParamOption struct {
RawQuery string
}
func NewRawURLParamOption ¶
func NewRawURLParamOption(rawQuery string) *RawURLParamOption
type URLParamOption ¶
func NewURLParamOption ¶
func NewURLParamOption(values url.Values) *URLParamOption
func NewURLParamOptionFromMap ¶
func NewURLParamOptionFromMap(values map[string]string) *URLParamOption
Click to show internal directories.
Click to hide internal directories.