Versions in this module Expand all Collapse all v0 v0.1.0 Jul 2, 2022 Changes in this version + const MethodDelete + const MethodGet + const MethodHead + const MethodOptions + const MethodPatch + const MethodPost + const MethodPut + var ErrInvalidProxyURL = errors.New(...) + var ErrRedirectLimitExceeded = errors.New("grequests: Request exceeded redirect count") + var RedirectLimit = 30 + var SensitiveHTTPHeaders = map[string]struct + func BuildHTTPClient(ro RqOptions) *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 Response struct + Error error + Header http.Header + Ok bool + RawResponse *http.Response + StatusCode int + func Delete(url string, ro *RqOptions) (*Response, error) + func DoRegularRequest(requestVerb, url string, ro *RqOptions) (*Response, error) + func Get(url string, ro *RqOptions) (*Response, error) + func Head(url string, ro *RqOptions) (*Response, error) + func Options(url string, ro *RqOptions) (*Response, error) + func Patch(url string, ro *RqOptions) (*Response, error) + func Post(url string, ro *RqOptions) (*Response, error) + func Put(url string, ro *RqOptions) (*Response, error) + func Req(verb string, url string, ro *RqOptions) (*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 RqOptions struct + Auth []string + BeforeRequest func(req *http.Request) error + Context context.Context + CookieJar http.CookieJar + Cookies []*http.Cookie + Data map[string]string + DialKeepAlive time.Duration + DialTimeout time.Duration + DisableCompression bool + Files []FileUpload + HTTPClient *http.Client + Headers map[string]string + Host string + InsecureSkipVerify bool + IsAjax bool + JSON interface{} + LocalAddr *net.TCPAddr + Params map[string]string + ProxyURL string + QueryStruct interface{} + RedirectLimit int + RequestBody io.Reader + RequestTimeout time.Duration + SensitiveHTTPHeaders map[string]struct{} + TLSHandshakeTimeout time.Duration + UseCookieJar bool + UserAgent string + XML interface{} + type Session struct + HTTPClient *http.Client + RqOptions *RqOptions + func NewSession(ro *RqOptions) *Session + func (s *Session) CloseIdleConnections() + func (s *Session) Delete(url string, ro *RqOptions) (*Response, error) + func (s *Session) Get(url string, ro *RqOptions) (*Response, error) + func (s *Session) Head(url string, ro *RqOptions) (*Response, error) + func (s *Session) Options(url string, ro *RqOptions) (*Response, error) + func (s *Session) Patch(url string, ro *RqOptions) (*Response, error) + func (s *Session) Post(url string, ro *RqOptions) (*Response, error) + func (s *Session) Put(url string, ro *RqOptions) (*Response, error) + type XMLCharDecoder func(charset string, input io.Reader) (io.Reader, error)