Documentation ¶
Index ¶
- type Clienter
- type HTTPClient
- func (c *HTTPClient) Delete(url string, resp interface{}) (err error)
- func (c *HTTPClient) Get(url string, resp interface{}) (err error)
- func (c *HTTPClient) PostForm(url string, body io.Reader, contentType string, resp interface{}) (err error)
- func (c *HTTPClient) PostJSON(url string, req, resp interface{}) (err error)
- func (c *HTTPClient) PutJSON(url string, req, resp interface{}) (err error)
- type HTTPTransport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clienter ¶
type Clienter interface { // Get handle json response Get(url string, resp interface{}) (err error) PostForm(url string, body io.Reader, contentType string, resp interface{}) (err error) PostJSON(url string, req, resp interface{}) (err error) PutJSON(url string, req, resp interface{}) (err error) Delete(url string, resp interface{}) (err error) }
Clienter client interface
func NewHTTPClient ¶
NewHTTPClient new http client with secret
func NewQuicClient ¶
NewQuicClient new quic client
type HTTPClient ¶
HTTPClient client
func (*HTTPClient) Delete ¶
func (c *HTTPClient) Delete(url string, resp interface{}) (err error)
Delete delete
func (*HTTPClient) Get ¶
func (c *HTTPClient) Get(url string, resp interface{}) (err error)
Get implement clienter
func (*HTTPClient) PostJSON ¶
func (c *HTTPClient) PostJSON(url string, req, resp interface{}) (err error)
PostJSON post with json
func (*HTTPClient) PutJSON ¶
func (c *HTTPClient) PutJSON(url string, req, resp interface{}) (err error)
PutJSON put with json
type HTTPTransport ¶
type HTTPTransport struct {
// contains filtered or unexported fields
}
HTTPTransport http transport
Click to show internal directories.
Click to hide internal directories.