Documentation ¶
Index ¶
- type Curl
- type Option
- type Response
- func Delete(url string) (Response, error)
- func Get(url string) (Response, error)
- func Patch(url string, body io.Reader) (Response, error)
- func Post(url string, body io.Reader) (Response, error)
- func PostFile(url string, files map[string]string, params map[string]string) (Response, error)
- func PostJson(url string, body io.Reader) (Response, error)
- func Put(url string, body io.Reader) (Response, error)
- func Send(request *http.Request) (Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Curl ¶
type Curl interface { // send get request Get(url string) (Response, error) // send post request Post(url string, body io.Reader) (Response, error) // send put request Put(url string, body io.Reader) (Response, error) // send patch request Patch(url string, body io.Reader) (Response, error) // send delete request Delete(url string) (Response, error) // post file PostFile(url string, files map[string]string, params map[string]string) (Response, error) // send http request Send(request *http.Request) (Response, error) // send post json request PostJson(url string, body io.Reader) (Response, error) }
Curl
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithHttpTransport ¶
WithHttpTransport set http transport option
func WithTimeout ¶
WithTimeout set http client timeout option
type Response ¶
type Response interface { // get string String() string // get byte Byte() []byte // json marshal BindJson(object interface{}) error // get reader Reader() io.Reader }
Response
Source Files ¶
Click to show internal directories.
Click to hide internal directories.