Versions in this module Expand all Collapse all v1 v1.0.2 Apr 3, 2023 v1.0.1 Nov 23, 2022 v1.0.0 Nov 23, 2022 Changes in this version + var ErrRedirectLimitExceeded = errors.New("grequests: Request exceeded redirect count") + var RedirectLimit = 30 + var SensitiveHTTPHeaders = map[string]struct + func BuildHTTPClient(ro RequestOptions) *http.Client + func EnsureTransporterFinalized(httpTransport *http.Transport) + type FileUpload struct + FieldName string + FileContents io.ReadCloser + FileMime string + FileName string + func FileUploadFromDisk(fileName string) ([]FileUpload, error) + func FileUploadFromGlob(fileSystemGlob string) ([]FileUpload, error) + type HTTPClientJarOptions struct + CookieJar http.CookieJar + Cookies []*http.Cookie + type HTTPClientOptions struct + Jar HTTPClientJarOptions + Timeout time.Duration + Transport HTTPClientTransportOptions + type HTTPClientTransportOptions struct + DialKeepAlive time.Duration + DialTimeout time.Duration + DisableCompression bool + IdleConnTimeout time.Duration + InsecureSkipVerify bool + LocalAddr *net.TCPAddr + MaxConnsPerHost int + MaxIdleConns int + MaxIdleConnsPerHost int + Proxies map[string]*url.URL + TLSHandshakeTimeout time.Duration + type RequestOptions struct + Auth []string + BeforeRequest func(req *http.Request) error + Context context.Context + Data map[string]string + Files []FileUpload + HTTPClient *http.Client + HTTPClientOptions HTTPClientOptions + Headers map[string]string + Host string + IsAjax bool + JSON interface{} + Params map[string]string + QueryStruct interface{} + RedirectLimit int + RequestBody io.Reader + SensitiveHTTPHeaders map[string]struct{} + UserAgent string + XML interface{} + type Response struct + Error error + Header http.Header + Ok bool + RawResponse *http.Response + StatusCode int + func Delete(url string, ro *RequestOptions) (*Response, error) + func DoRegularRequest(requestVerb, url string, ro *RequestOptions) (*Response, error) + func Get(url string, ro *RequestOptions) (*Response, error) + func Head(url string, ro *RequestOptions) (*Response, error) + func Options(url string, ro *RequestOptions) (*Response, error) + func Patch(url string, ro *RequestOptions) (*Response, error) + func Post(url string, ro *RequestOptions) (*Response, error) + func Put(url string, ro *RequestOptions) (*Response, error) + func Req(verb string, url string, ro *RequestOptions) (*Response, error) + func (r *Response) Bytes() []byte + func (r *Response) ClearInternalBuffer() + func (r *Response) Close() error + func (r *Response) DownloadToFile(fileName string) error + func (r *Response) JSON(userStruct interface{}) error + func (r *Response) Read(p []byte) (n int, err error) + func (r *Response) String() string + func (r *Response) XML(userStruct interface{}, charsetReader XMLCharDecoder) error + type Session struct + HTTPClient *http.Client + RequestOptions *RequestOptions + func NewSession(ro *RequestOptions) *Session + func (s *Session) CloseIdleConnections() + func (s *Session) Delete(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Get(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Head(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Options(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Patch(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Post(url string, ro *RequestOptions) (*Response, error) + func (s *Session) Put(url string, ro *RequestOptions) (*Response, error) + type XMLCharDecoder func(charset string, input io.Reader) (io.Reader, error)