httpx

package
v1.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.3.7

type Client struct {
	*http.Client
	R *Request
}

func NewClient added in v1.3.7

func NewClient(timeout time.Duration) *Client

func (*Client) Delete added in v1.3.7

func (c *Client) Delete(URL string, options ...Option) (*Client, error)

func (*Client) Do added in v1.3.7

func (c *Client) Do() (*Response, error)

func (*Client) DoDelete added in v1.3.7

func (c *Client) DoDelete(URL string, options ...Option) (*Response, error)

func (*Client) DoGet added in v1.3.7

func (c *Client) DoGet(URL string, options ...Option) (*Response, error)

func (*Client) DoOption added in v1.3.7

func (c *Client) DoOption(URL string, options ...Option) (*Response, error)

func (*Client) DoPatch added in v1.3.7

func (c *Client) DoPatch(URL string, options ...Option) (*Response, error)

func (*Client) DoPost added in v1.3.7

func (c *Client) DoPost(URL string, options ...Option) (*Response, error)

func (*Client) DoPut added in v1.3.7

func (c *Client) DoPut(URL string, options ...Option) (*Response, error)

func (*Client) DoTrace added in v1.3.7

func (c *Client) DoTrace(URL string, options ...Option) (*Response, error)

func (*Client) Get added in v1.3.7

func (c *Client) Get(URL string, options ...Option) (*Client, error)

func (*Client) Option added in v1.3.7

func (c *Client) Option(URL string, options ...Option) (*Client, error)

func (*Client) Patch added in v1.3.7

func (c *Client) Patch(URL string, options ...Option) (*Client, error)

func (*Client) Post added in v1.3.7

func (c *Client) Post(URL string, options ...Option) (*Client, error)

func (*Client) Put added in v1.3.7

func (c *Client) Put(URL string, options ...Option) (*Client, error)

func (*Client) Request added in v1.3.7

func (c *Client) Request(method, URL string, options ...Option) (*Client, error)

func (*Client) Trace added in v1.3.7

func (c *Client) Trace(URL string, options ...Option) (*Client, error)

type Option added in v1.3.7

type Option func(req *Request) error

func Body added in v1.3.7

func Body(body interface{}) Option

func ContentType added in v1.3.7

func ContentType(contentType string) Option
func Header(header http.Header) Option

func Header2 added in v1.3.7

func Header2(header map[string]string) Option

func Header3 added in v1.3.7

func Header3(name, value string) Option

func Param added in v1.3.7

func Param(values url.Values) Option

func Param2 added in v1.3.7

func Param2(values map[string]string) Option

func Param3 added in v1.3.7

func Param3(name, value string) Option

type Request added in v1.3.7

type Request struct {
	Method     string
	URL        *url.URL
	Body       interface{}
	BodyReader io.Reader
	Param      url.Values
	Header     http.Header
	Timeout    time.Duration
}

func (*Request) Curl added in v1.3.7

func (r *Request) Curl() string

func (*Request) Parse added in v1.3.7

func (r *Request) Parse() (*http.Request, error)

type Response added in v1.3.7

type Response struct {
	*http.Response
	Success bool
	// contains filtered or unexported fields
}

func (*Response) Bind added in v1.3.7

func (r *Response) Bind(o interface{}) error

func (*Response) Data added in v1.3.7

func (r *Response) Data() []byte

func (*Response) DataString added in v1.3.7

func (r *Response) DataString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL