Documentation
¶
Index ¶
- Constants
- func PrepareRequest(proto string, method string, url string, params types.Dict, headers types.Dict, ...) (error, *prepareRequest)
- type Request
- type Response
- func Delete(url string, ext ...types.Ext) *Response
- func Get(url string, ext ...types.Ext) *Response
- func Head(url string, ext ...types.Ext) *Response
- func Options(url string, ext ...types.Ext) *Response
- func Post(url string, ext ...types.Ext) *Response
- func Put(url string, ext ...types.Ext) *Response
- func (resp *Response) ContentType() string
- func (resp *Response) CustomRender(targetListenerCallbacks []func(ev interface{}), ...) *Response
- func (resp *Response) Json() *gjson.Result
- func (resp *Response) Render() *Response
- func (resp *Response) Save(savePath string) (string, error)
- func (resp *Response) Snapshot(fullscreen bool, png bool) *[]byte
- func (resp *Response) Text() string
- func (resp *Response) Title() string
- func (resp *Response) URLs() []string
- func (resp *Response) XPath() *parser.XpathNode
- type Session
- func (s *Session) Delete(url string, ext ...types.Ext) *Response
- func (s *Session) Get(url string, ext ...types.Ext) *Response
- func (s *Session) Head(url string, ext ...types.Ext) *Response
- func (s *Session) Options(url string, ext ...types.Ext) *Response
- func (s *Session) Post(url string, ext ...types.Ext) *Response
- func (s *Session) Put(url string, ext ...types.Ext) *Response
- func (s *Session) RegisterHook(key string, hook types.Hook) error
- func (s *Session) Send(prep *prepareRequest) *Response
Constants ¶
View Source
const DefaultTimeout = 5 // time.Second
View Source
const Version = "v1.1.15"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Response ¶
type Response struct { *http.Response Session *Session History []*Response Html string Ok bool Raw *[]byte // contains filtered or unexported fields }
func (*Response) ContentType ¶
func (*Response) CustomRender ¶
func (resp *Response) CustomRender(targetListenerCallbacks []func(ev interface{}), flags []chromedp.ExecAllocatorOption, actions ...chromedp.Action) *Response
CustomRender 支持各类Action接口实现
type Session ¶
type Session struct { types.ExtensionPackage Client *http.Client // contains filtered or unexported fields }
func HTMLSession ¶
func HTMLSession() *Session
Source Files
¶
Click to show internal directories.
Click to hide internal directories.