xgorequest

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGorequestTransport

func GetGorequestTransport() transport.Factory

GetGorequestTransport returns new transport.Factory.

func PrepareRequestDetail

func PrepareRequestDetail(s *gorequest.SuperAgent, c *dudu.RequestDetail) error

PrepareRequestDetail will prepare some options and request-details when a request fetch to remote.

func RequestRemote

func RequestRemote(s *gorequest.SuperAgent) (response gorequest.Response, body []byte, errs []error)

RequestRemote send request to remote server.

func UncompressContentEncoding

func UncompressContentEncoding(compressionType string, content io.Reader) (uncompressContent []byte, err error)

UncompressContentEncoding will hand content from remote response.

Types

type RequestTransport

type RequestTransport struct {
	// contains filtered or unexported fields
}

RequestTransport request transport tool struct.

func (*RequestTransport) Close

func (e *RequestTransport) Close() error

Close close.

func (*RequestTransport) FetchRemoteResponse

func (e *RequestTransport) FetchRemoteResponse(c *dudu.RequestDetail) (*http.Response, []byte, error)

FetchRemoteResponse fetch remote response.

func (*RequestTransport) GoRequest

GoRequest got transport.GoRequestTransport obj.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL