Documentation
¶
Index ¶
- Constants
- type Cookies
- type Gofetcher
- func (gofetcher *Gofetcher) ExecuteRequest(req *http.Request, client *http.Client, attempt int) (*http.Response, error)
- func (gofetcher *Gofetcher) GetHandler(method string) func(request *cocaine.Request, response *cocaine.Response)
- func (gofetcher *Gofetcher) HttpEcho(res http.ResponseWriter, req *http.Request)
- func (gofetcher *Gofetcher) HttpProxy(res http.ResponseWriter, req *http.Request)
- func (gofetcher *Gofetcher) ParseRequest(method string, requestBody []byte) (request *Request)
- func (gofetcher *Gofetcher) PrepareRequest(request *Request) (*http.Request, *http.Client, error)
- func (gofetcher *Gofetcher) SetUserAgent(userAgent string)
- func (gofetcher *Gofetcher) WriteError(response *cocaine.Response, request *Request, err error)
- func (gofetcher *Gofetcher) WriteResponse(response *cocaine.Response, request *Request, resp *http.Response, body []byte)
- type Request
- type Response
- type WarnError
Constants ¶
View Source
const ( DefaultTimeout = 5000 DefaultFollowRedirects = true KeepAliveTimeout = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gofetcher ¶
type Gofetcher struct { Logger *cocaine.Logger Transport http.RoundTripper UserAgent string }
func NewGofetcher ¶
func NewGofetcher() *Gofetcher
func (*Gofetcher) ExecuteRequest ¶
func (*Gofetcher) GetHandler ¶
func (*Gofetcher) HttpEcho ¶
func (gofetcher *Gofetcher) HttpEcho(res http.ResponseWriter, req *http.Request)
func (*Gofetcher) HttpProxy ¶
func (gofetcher *Gofetcher) HttpProxy(res http.ResponseWriter, req *http.Request)
func (*Gofetcher) ParseRequest ¶
func (*Gofetcher) PrepareRequest ¶
func (*Gofetcher) SetUserAgent ¶
func (*Gofetcher) WriteError ¶
Click to show internal directories.
Click to hide internal directories.