Documentation ¶
Index ¶
- Constants
- func Connect(rawurl string, req *url.Request) (*models.Response, error)
- func DecompressBody(content *[]byte, encoding string)
- func Delete(rawurl string, req *url.Request) (*models.Response, error)
- func Get(rawurl string, req *url.Request) (*models.Response, error)
- func Head(rawurl string, req *url.Request) (*models.Response, error)
- func Options(rawurl string, req *url.Request) (*models.Response, error)
- func Patch(rawurl string, req *url.Request) (*models.Response, error)
- func Post(rawurl string, req *url.Request) (*models.Response, error)
- func Put(rawurl string, req *url.Request) (*models.Response, error)
- func Request(method, rawurl string, req *url.Request) (*models.Response, error)
- func Trace(rawurl string, req *url.Request) (*models.Response, error)
- type Session
- func (s *Session) Connect(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Delete(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Get(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Head(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Options(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Patch(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Post(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Prepare_request(request *models.Request) (*models.PrepareRequest, error)
- func (s *Session) Put(rawurl string, req *url.Request) (*models.Response, error)
- func (s *Session) Request(method, rawurl string, request *url.Request) (*models.Response, error)
- func (s *Session) Send(preq *models.PrepareRequest, req *url.Request) (*models.Response, error)
- func (s *Session) Trace(rawurl string, req *url.Request) (*models.Response, error)
Constants ¶
View Source
const ( DEFAULT_REDIRECT_LIMIT = 30 // 默认redirect最大次数 DEFAULT_TIMEOUT = 10 // 默认client响应时间 )
View Source
const ( NAME = "golang-requests" // 名称 VERSION = "1.2.4" // 当前版本 USER_AGENT = NAME + VERSION // UA )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct { Params *url.Params Headers *http.Header Cookies *cookiejar.Jar Auth []string Proxies string Verify bool Cert []string Ja3 string MaxRedirects int TLSExtensions *ja3.TLSExtensions HTTP2Settings *http2.HTTP2Settings // contains filtered or unexported fields }
Session结构体
func (*Session) Prepare_request ¶
预请求处理
Click to show internal directories.
Click to hide internal directories.