Documentation
¶
Index ¶
- type Config
- type Options
- type Remote
- func (remote *Remote) DELETE(config Options) (*http.Response, error)
- func (remote *Remote) GET(config Options) (*http.Response, error)
- func (remote *Remote) HEAD(config Options) (*http.Response, error)
- func (remote *Remote) PATCH(config Options) (*http.Response, error)
- func (remote *Remote) POST(config Options) (*http.Response, error)
- func (remote *Remote) PUT(config Options) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
//add cookie jar on avery request
Jar http.CookieJar
//Request time out
Timeout time.Duration
//check if there are a script to redirect the request on another URL
CheckRedirect func(req *http.Request, via []*http.Request) error
}
Config is to set up the client option
type Options ¶
type Options struct {
//URL to visit
URL string
//data(map) to query on a domain
Query map[string][]string
//Request header
Header map[string]string
//Request body
Body interface{}
}
Options is to set up the request.
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
Remote Client
func (*Remote) DELETE ¶
DELETE Makes DELETE requests on a specific url with the configurations defined in RequestConfig
func (*Remote) GET ¶
GET Makes GET requests on a specific url with the configurations defined in RequestConfig
func (*Remote) HEAD ¶
HEAD Makes HEAD requests on a specific url with the configurations defined in RequestConfig
func (*Remote) PATCH ¶
PATCH Makes PATCH requests on a specific url with the configurations defined in RequestConfig
Click to show internal directories.
Click to hide internal directories.