Documentation
¶
Index ¶
- type Client
- func (c *Client) CheckRedircet(f func(req *http.Request, via []*http.Request) error)
- func (c *Client) Delete(url string, params url.Values) (data []byte, httpstatus int, err error)
- func (c *Client) DeleteRaw(url string, body io.Reader) (data []byte, httpstatus int, err error)
- func (c *Client) DeleteRawWithOnceHeader(url string, body io.Reader, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) DeleteWithOnceHeader(url string, params url.Values, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) Get(url string, params url.Values) (data []byte, httpstatus int, err error)
- func (c *Client) GetWithOnceHeader(url string, params url.Values, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) Post(url string, params url.Values) (data []byte, httpstatus int, err error)
- func (c *Client) PostRaw(url string, body io.Reader) (data []byte, httpstatus int, err error)
- func (c *Client) PostRawWithOnceHeader(url string, body io.Reader, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) PostWithOnceHeader(url string, params url.Values, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) Put(url string, params url.Values) (data []byte, httpstatus int, err error)
- func (c *Client) PutRaw(url string, body io.Reader) (data []byte, httpstatus int, err error)
- func (c *Client) PutRawWithOnceHeader(url string, body io.Reader, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) PutWithOnceHeader(url string, params url.Values, headers map[string]string) (data []byte, httpstatus int, err error)
- func (c *Client) ResolveRequest(req *http.Request, params url.Values, e error) (data []byte, httpstatus int, err error)
- func (c *Client) ResolveTraceRequest(req *http.Request, trace *httptrace.ClientTrace) (data []byte, httpstatus int, err error)
- func (c *Client) SetBasicAuth(username, password string) *Client
- func (c *Client) SetHeader(key, value string) *Client
- func (c *Client) SetHost(host string) *Client
- type Trace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client instance
func (*Client) CheckRedircet ¶ added in v1.0.6
func (*Client) DeleteRawWithOnceHeader ¶ added in v1.1.0
func (*Client) DeleteWithOnceHeader ¶
func (*Client) GetWithOnceHeader ¶
func (*Client) PostRawWithOnceHeader ¶ added in v1.0.5
func (*Client) PostWithOnceHeader ¶
func (*Client) PutRawWithOnceHeader ¶ added in v1.1.0
func (*Client) PutWithOnceHeader ¶
func (*Client) ResolveRequest ¶ added in v1.0.6
func (*Client) ResolveTraceRequest ¶ added in v1.1.2
func (c *Client) ResolveTraceRequest(req *http.Request, trace *httptrace.ClientTrace) (data []byte, httpstatus int, err error)
ResolveTraceRequest 自定義 httptrace
func (*Client) SetBasicAuth ¶
SetBasicAuth set Basic auth
type Trace ¶
type Trace struct { Url string `json:"url"` Method string `json:"method"` Body string `json:"body"` Param string `json:"param"` DNSLookup time.Duration `json:"dns_lookup"` TCPConnection time.Duration `json:"tcp_connection"` TLSHandshake time.Duration `json:"tls_handshake"` ServerProcessing time.Duration `json:"server_prcoessing"` ContentTransfer time.Duration `json:"content_transfer"` NameLookup time.Duration `json:"name_lookup"` Connect time.Duration `json:"connect"` PreTransfer time.Duration `json:"pre_transfer"` StartTransfer time.Duration `json:"start_transfer"` Total time.Duration `json:"total"` }
Click to show internal directories.
Click to hide internal directories.