Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FetchOptions ¶
type FetchOptions struct {
Method string `json:"method"`
Body string `json:"body"`
Headers map[string]string `json:"headers"`
Redirect FetchOptionsRedirect `json:"redirects"`
Follow int `json:"follow"`
Compress bool `json:"compress"`
Size int `json:"size"`
Agent string `json:"agent"`
HighWaterMark int `json:"highWaterMark"`
InsecureHTTPParser bool `json:"insecureHTTPParser"`
}
type FetchOptionsRedirect ¶
type FetchOptionsRedirect string
const ( Follow FetchOptionsRedirect = "follow" Error FetchOptionsRedirect = "error" Manual FetchOptionsRedirect = "manual" )
type HttpModule ¶
type HttpModule struct {
// contains filtered or unexported fields
}
func (*HttpModule) Exports ¶
func (hp *HttpModule) Exports() *modules.Exports
func (*HttpModule) FetchAsync ¶
func (hp *HttpModule) FetchAsync(url string, fetchOpts FetchOptions) (*goja.Promise, error)
Click to show internal directories.
Click to hide internal directories.