Documentation ¶
Index ¶
- Variables
- func D(method string, url string, body []byte, expectedStatusCode int, ...) ([]byte, *http.Response, error)
- func Dctx(ctx context.Context, method string, url string, body []byte, ...) ([]byte, *http.Response, error)
- func Do(req *http.Request) (*http.Response, error)
- func DoBody(req *http.Request) ([]byte, *http.Response, error)
- func DoCtx(ctx context.Context, req *http.Request) (*http.Response, error)
- func DoRaw(method string, url string, body []byte, expectedStatusCode int, ...) (*http.Response, error)
- func DoRawCtx(ctx context.Context, method string, url string, body []byte, checkCode int, ...) (*http.Response, error)
- func DoRawTimeout(timeout time.Duration, method string, url string, body []byte, checkCode int, ...) (*http.Response, error)
- func DoTimeout(req *http.Request, timeout time.Duration) (*http.Response, error)
- func Dtimeout(timeout time.Duration, method string, url string, body []byte, checkCode int, ...) ([]byte, *http.Response, error)
- func G(url string, headersKV ...string) ([]byte, *http.Response, error)
- func Gctx(ctx context.Context, url string, headersKV ...string) ([]byte, *http.Response, error)
- func Get(url string, headersKV ...string) (*http.Response, error)
- func GetCtx(ctx context.Context, url string, headersKV ...string) (*http.Response, error)
- func GetTimeout(timeout time.Duration, url string, headersKV ...string) (*http.Response, error)
- func Gtimeout(timeout time.Duration, url string, headersKV ...string) ([]byte, *http.Response, error)
- func P(url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func Pctx(ctx context.Context, url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func Post(url string, body []byte, expectedStatusCode int, headersKV ...string) (*http.Response, error)
- func PostCtx(ctx context.Context, url string, body []byte, expectedStatusCode int, ...) (*http.Response, error)
- func PostTimeout(timeout time.Duration, url string, body []byte, expectedStatusCode int, ...) (*http.Response, error)
- func Ptimeout(timeout time.Duration, url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func Pu(url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func PuCtx(ctx context.Context, url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func PuTimeout(timeout time.Duration, url string, body []byte, headersKV ...string) ([]byte, *http.Response, error)
- func Put(url string, body []byte, expectedStatusCode int, headersKV ...string) (*http.Response, error)
- func PutCtx(ctx context.Context, url string, body []byte, expectedStatusCode int, ...) (*http.Response, error)
- func PutTimeout(timeout time.Duration, url string, body []byte, expectedStatusCode int, ...) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( C = &http.Client{ Transport: http.DefaultTransport, Timeout: time.Second * 30, } // allowed to reset ErrRespStatusCodeNotExpected = errors.New("response status code not expected") )
Functions ¶
func DoRawTimeout ¶
func GetTimeout ¶
func PostTimeout ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.