Documentation ¶
Index ¶
- type HttpClient
- func (client *HttpClient) DELETE(url string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) Delete(url string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) GET(url string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) Get(url string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) GetClient() *http.Client
- func (client *HttpClient) NewTransPort() *http.Transport
- func (client *HttpClient) PATCH(url string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) POST(url string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) PUT(url string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) Patch(url string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) Post(url string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) Put(url string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) Request(url, method string, header http.Header, data []byte) ([]byte, error)
- func (client *HttpClient) RequestEx(url, method string, header http.Header, data []byte) (*HttpRespone, error)
- func (client *HttpClient) RequestStream(url, method string, header http.Header, data []byte) (io.ReadCloser, error)
- func (client *HttpClient) SetBatchHeader(headerSet []*http2.HeaderSet)
- func (client *HttpClient) SetHeader(key, value string)
- func (client *HttpClient) SetTimeOut(timeOut time.Duration)
- func (client *HttpClient) SetTlsNoVerity() error
- func (client *HttpClient) SetTlsVerity(caFile, certFile, keyFile, passwd string) error
- func (client *HttpClient) SetTlsVerityConfig(tlsConf *tls.Config)
- func (client *HttpClient) SetTlsVerityServer(caFile string) error
- func (client *HttpClient) SetTransPort(transport http.RoundTripper)
- type HttpRespone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient() *HttpClient
func (*HttpClient) Delete ¶
func (client *HttpClient) Delete(url string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) Get ¶
func (client *HttpClient) Get(url string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) GetClient ¶
func (client *HttpClient) GetClient() *http.Client
func (*HttpClient) NewTransPort ¶
func (client *HttpClient) NewTransPort() *http.Transport
func (*HttpClient) Patch ¶
func (client *HttpClient) Patch(url string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) Post ¶
func (client *HttpClient) Post(url string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) Put ¶
func (client *HttpClient) Put(url string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) RequestEx ¶
func (client *HttpClient) RequestEx(url, method string, header http.Header, data []byte) (*HttpRespone, error)
func (*HttpClient) RequestStream ¶
func (client *HttpClient) RequestStream(url, method string, header http.Header, data []byte) (io.ReadCloser, error)
func (*HttpClient) SetBatchHeader ¶
func (client *HttpClient) SetBatchHeader(headerSet []*http2.HeaderSet)
SetBatchHeader batch set header for the http client。 Note:if the header is the same with the parameter(header) which is specified in the function GET, POST, PUT,DELETE,Patch and so on. this set header is ignore in the call
func (*HttpClient) SetHeader ¶
func (client *HttpClient) SetHeader(key, value string)
SetHeader set header for the http client。 Note:if the header is the same with the parameter(header) which is specified in the function GET, POST, PUT,DELETE,Patch and so on. this set header is ignore in the call
func (*HttpClient) SetTimeOut ¶
func (client *HttpClient) SetTimeOut(timeOut time.Duration)
func (*HttpClient) SetTlsNoVerity ¶
func (client *HttpClient) SetTlsNoVerity() error
func (*HttpClient) SetTlsVerity ¶
func (client *HttpClient) SetTlsVerity(caFile, certFile, keyFile, passwd string) error
func (*HttpClient) SetTlsVerityConfig ¶
func (client *HttpClient) SetTlsVerityConfig(tlsConf *tls.Config)
func (*HttpClient) SetTlsVerityServer ¶
func (client *HttpClient) SetTlsVerityServer(caFile string) error
func (*HttpClient) SetTransPort ¶
func (client *HttpClient) SetTransPort(transport http.RoundTripper)
Click to show internal directories.
Click to hide internal directories.