Documentation
¶
Index ¶
- func Encode(body interface{}) []byte
- func Get(ctx context.Context, url string) string
- func GetDecompressBody(compressType string, body io.ReadCloser) (io.ReadCloser, error)
- func Post(ctx context.Context, url string, body interface{}) string
- func ToBytes(res *http.Response, err error) []byte
- func ToString(res *http.Response, err error) string
- type Client
- func (t *Client) Delete(ctx context.Context, url string, headers http.Header) (*http.Response, error)
- func (t *Client) Do(ctx context.Context, method string, url string, headers http.Header, ...) (*http.Response, error)
- func (t *Client) Get(ctx context.Context, url string, headers http.Header) (*http.Response, error)
- func (t *Client) Post(ctx context.Context, url string, headers http.Header, body []byte) (*http.Response, error)
- func (t *Client) Put(ctx context.Context, url string, headers http.Header, body []byte) (*http.Response, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDecompressBody ¶ added in v0.0.5
func GetDecompressBody(compressType string, body io.ReadCloser) (io.ReadCloser, error)
GetDecompressBody ...
Types ¶
type Client ¶ added in v0.0.5
Client ...
func (*Client) Delete ¶ added in v0.0.5
func (t *Client) Delete( ctx context.Context, url string, headers http.Header, ) (*http.Response, error)
Delete ...
func (*Client) Do ¶ added in v0.0.5
func (t *Client) Do( ctx context.Context, method string, url string, headers http.Header, body []byte, ) (*http.Response, error)
Do ...
func (*Client) Get ¶ added in v0.0.5
func (t *Client) Get( ctx context.Context, url string, headers http.Header, ) (*http.Response, error)
Get ...
Click to show internal directories.
Click to hide internal directories.