Documentation ¶
Index ¶
- Constants
- func DefaultTransport() *http.Transport
- func ProxyFromEnvironment(req *http.Request) (*url.URL, error)
- type Option
- type Request
- func (r Request) Content() []byte
- func (r Request) ContentToString() string
- func (r *Request) Delete(originUrl string, data map[string]interface{}) error
- func (r *Request) Download(filePath, originUrl string) error
- func (r *Request) DownloadWithRateLimit(filePath, originUrl string, rate int64) error
- func (r *Request) Get(originUrl string, params map[string]string) error
- func (r *Request) ParseUrl(originUrl string) error
- func (r *Request) Post(originUrl string, data map[string]interface{}) error
- func (r *Request) PostForm(originUrl string, data map[string]string) error
- func (r *Request) Put(originUrl string, data map[string]interface{}) error
- func (r Request) Request() *http.Request
- func (r Request) Response() *http.Response
- func (r *Request) SetBasicAuth(username, password string)
- func (r *Request) SetBearerTokenAuth(token string)
- func (r *Request) SetHeader(headers map[string]string)
- func (r *Request) SetProxy(proxy map[string]string)
- func (r *Request) SetTimeout(t time.Duration)
- func (r *Request) SetTransport(transport *http.Transport)
- func (r *Request) SkipTLSVerify()
- func (r Request) Status() (int, string)
- func (r *Request) UnSetProxy()
- func (r *Request) Upload(originUrl string, data map[string]string, filePaths ...string) error
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func DefaultTransport ¶ added in v1.2.3
Types ¶
type Option ¶ added in v1.1.5
type Option func(*Request)
func WithBasicAuth ¶ added in v1.1.5
func WithBearerTokenAuth ¶ added in v1.1.5
func WithHeader ¶ added in v1.1.5
func WithSkipTLSVerify ¶ added in v1.1.5
func WithSkipTLSVerify() Option
func WithTimeout ¶ added in v1.1.5
func WithUnSetProxy ¶ added in v1.2.3
func WithUnSetProxy() Option
type Request ¶ added in v1.0.2
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶ added in v1.0.2
func NewSession ¶
func (Request) ContentToString ¶ added in v1.1.0
func (*Request) DownloadWithRateLimit ¶ added in v1.1.2
func (*Request) SetBasicAuth ¶ added in v1.0.3
func (*Request) SetBearerTokenAuth ¶ added in v1.0.3
func (*Request) SetTimeout ¶ added in v1.0.3
func (*Request) SetTransport ¶ added in v1.2.3
func (*Request) SkipTLSVerify ¶ added in v1.0.3
func (r *Request) SkipTLSVerify()
func (*Request) UnSetProxy ¶ added in v1.2.3
func (r *Request) UnSetProxy()
Click to show internal directories.
Click to hide internal directories.