Documentation
¶
Index ¶
- func FollowRedirectsCallback(howmany int) func(r *http.Request, via []*http.Request) error
- type Form
- type FormField
- type Input
- type Mechanize
- func (m *Mechanize) BuildRequest(method, u string, body io.Reader) (*http.Request, error)
- func (m *Mechanize) Get(u string) error
- func (m *Mechanize) Head(u string) error
- func (m *Mechanize) LastError() error
- func (m *Mechanize) LastRequest() *http.Request
- func (m *Mechanize) LastResponse() *Response
- func (m *Mechanize) Post(u string, bodyType string, body io.Reader) error
- func (m *Mechanize) PostForm(u string, data url.Values) error
- func (m *Mechanize) ResolveURL(u *url.URL) *url.URL
- func (m *Mechanize) SendRequest(req *http.Request) error
- func (m *Mechanize) SetMaxRedirects(howmany int)
- type Response
- func (r *Response) Base() string
- func (r *Response) Form(sel string) (*Form, error)
- func (r *Response) Forms() []*Form
- func (r *Response) IsClientError() bool
- func (r *Response) IsError() bool
- func (r *Response) IsHTML() bool
- func (r *Response) IsRedirect() bool
- func (r *Response) IsSuccess() bool
- func (r *Response) RawBody() []byte
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mechanize ¶
type Mechanize struct { Agent string Client *http.Client CookieJar *cookiejar.Jar Headers http.Header SendReferer bool // contains filtered or unexported fields }
Example ¶
{ }
Output:
func (*Mechanize) BuildRequest ¶
func (*Mechanize) LastRequest ¶
LastRequest returns the most recent *http.Request. If there are no request/response recorded, then the this method returns nil
func (*Mechanize) LastResponse ¶
LastResponse returns the most recent *Response. If there are no request/response recorded, then the this method returns nil
func (*Mechanize) SetMaxRedirects ¶
Click to show internal directories.
Click to hide internal directories.