crash.software
Projects
Pull Requests
Issues
Builds
scan4all
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
scan4all
Files
🤬
Sign In
d3f2fa63
ROOT
/
vendor
/
github.com
/
go-rod
/
rod
/
hijack.go
Search
History
428 lines
|
ISO-8859-1
|
10 KB
Blame
Outline
2
4
8
No wrap
Soft wrap
Outline
HijackRouter
run
:
func()
stop
:
func()
handlers
:
[]*hijackHandler
enable
:
*proto.FetchEnable
client
:
proto.Client
browser
:
*Browser
newHijackRouter
(browser *Browser, client proto.Client)
:
*HijackRouter
hijackHandler
pattern
:
string
regexp
:
*regexp.Regexp
handler
:
func(*Hijack)
Hijack
Request
:
*HijackRequest
Response
:
*HijackResponse
OnError
:
func(error)
Skip
:
bool
continueRequest
:
*proto.FetchContinueRequest
CustomState
browser
:
*Browser
HijackRequest
event
:
*proto.FetchRequestPaused
req
:
*http.Request
HijackResponse
payload
:
*proto.FetchFulfillRequest
fail
:
*proto.FetchFailRequest
*Browser
HijackRequests
()
:
*HijackRouter
HandleAuth
(username, password string)
:
func() error
*Page
HijackRequests
()
:
*HijackRouter
*HijackRouter
initEvents
()
:
*HijackRouter
Add
(pattern string, resourceType proto.NetworkResourceType, handler func(*Hijack))
:
error
Remove
(pattern string)
:
error
new
(ctx context.Context, e *proto.FetchRequestPaused)
:
*Hijack
Run
()
Stop
()
:
error
*Hijack
ContinueRequest
(cq *proto.FetchContinueRequest)
LoadResponse
(client *http.Client, loadBody bool)
:
error
*HijackRequest
Type
()
:
proto.NetworkResourceType
Method
()
:
string
URL
()
:
*url.URL
Header
(key string)
:
string
Headers
()
:
proto.NetworkHeaders
Body
()
:
string
JSONBody
()
:
gson.JSON
Req
()
:
*http.Request
SetContext
(c context.Context)
:
*HijackRequest
SetBody
(obj interface{})
:
*HijackRequest
IsNavigation
()
:
bool
*HijackResponse
Payload
()
:
*proto.FetchFulfillRequest
Body
()
:
string
Headers
()
:
http.Header
SetHeader
(pairs ...string)
:
*HijackResponse
SetBody
(obj interface{})
:
*HijackResponse
Fail
(reason proto.NetworkErrorReason)
:
*HijackResponse
All occurrences
Please wait...
Page is in error, reload to recover