Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - type HTTP
 - func (http *HTTP) Batch(ctx context.Context, reqsV goja.Value) (goja.Value, error)
 - func (*HTTP) CookieJar(ctx context.Context) *HTTPCookieJar
 - func (http *HTTP) Del(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Get(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Head(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Patch(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Post(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Put(ctx context.Context, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Request(ctx context.Context, method string, url goja.Value, args ...goja.Value) (*HTTPResponse, error)
 - func (http *HTTP) Url(parts []string, pieces ...string) URLTag
 - func (*HTTP) XCookieJar(ctx *context.Context) *HTTPCookieJar
 
- type HTTPCookie
 - type HTTPCookieJar
 - type HTTPRequestCookie
 - type HTTPResponse
 - type HTTPResponseTimings
 - type OCSP
 - type URLTag
 
Constants ¶
      View Source
      
  
    const OCSP_REASON_AA_COMPROMISE = "aa_compromise"
    
      View Source
      
  
    const OCSP_REASON_AFFILIATION_CHANGED = "affiliation_changed"
    
      View Source
      
  
    const OCSP_REASON_CA_COMPROMISE = "ca_compromise"
    
      View Source
      
  
    const OCSP_REASON_CERTIFICATE_HOLD = "certificate_hold"
    
      View Source
      
  
    const OCSP_REASON_CESSATION_OF_OPERATION = "cessation_of_operation"
    
      View Source
      
  
    const OCSP_REASON_KEY_COMPROMISE = "key_compromise"
    
      View Source
      
  
    const OCSP_REASON_PRIVILEGE_WITHDRAWN = "privilege_withdrawn"
    
      View Source
      
  
    const OCSP_REASON_REMOVE_FROM_CRL = "remove_from_crl"
    
      View Source
      
  
    const OCSP_REASON_SUPERSEDED = "superseded"
    
      View Source
      
  
    const OCSP_REASON_UNSPECIFIED = "unspecified"
    
      View Source
      
  
    const OCSP_STATUS_GOOD = "good"
    
      View Source
      
  
    const OCSP_STATUS_REVOKED = "revoked"
    
      View Source
      
  
    const OCSP_STATUS_SERVER_FAILED = "server_failed"
    
      View Source
      
  
    const OCSP_STATUS_UNKNOWN = "unknown"
    
      View Source
      
  
    const SSL_3_0 = "ssl3.0"
    
      View Source
      
  
    const TLS_1_0 = "tls1.0"
    
      View Source
      
  
    const TLS_1_1 = "tls1.1"
    
      View Source
      
  
const TLS_1_2 = "tls1.2"
    Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTP ¶
type HTTP struct {
	SSL_3_0                            string `js:"SSL_3_0"`
	TLS_1_0                            string `js:"TLS_1_0"`
	TLS_1_1                            string `js:"TLS_1_1"`
	TLS_1_2                            string `js:"TLS_1_2"`
	OCSP_STATUS_GOOD                   string `js:"OCSP_STATUS_GOOD"`
	OCSP_STATUS_REVOKED                string `js:"OCSP_STATUS_REVOKED"`
	OCSP_STATUS_SERVER_FAILED          string `js:"OCSP_STATUS_SERVER_FAILED"`
	OCSP_STATUS_UNKNOWN                string `js:"OCSP_STATUS_UNKNOWN"`
	OCSP_REASON_UNSPECIFIED            string `js:"OCSP_REASON_UNSPECIFIED"`
	OCSP_REASON_KEY_COMPROMISE         string `js:"OCSP_REASON_KEY_COMPROMISE"`
	OCSP_REASON_CA_COMPROMISE          string `js:"OCSP_REASON_CA_COMPROMISE"`
	OCSP_REASON_AFFILIATION_CHANGED    string `js:"OCSP_REASON_AFFILIATION_CHANGED"`
	OCSP_REASON_SUPERSEDED             string `js:"OCSP_REASON_SUPERSEDED"`
	OCSP_REASON_CESSATION_OF_OPERATION string `js:"OCSP_REASON_CESSATION_OF_OPERATION"`
	OCSP_REASON_CERTIFICATE_HOLD       string `js:"OCSP_REASON_CERTIFICATE_HOLD"`
	OCSP_REASON_REMOVE_FROM_CRL        string `js:"OCSP_REASON_REMOVE_FROM_CRL"`
	OCSP_REASON_PRIVILEGE_WITHDRAWN    string `js:"OCSP_REASON_PRIVILEGE_WITHDRAWN"`
	OCSP_REASON_AA_COMPROMISE          string `js:"OCSP_REASON_AA_COMPROMISE"`
}
    func (*HTTP) CookieJar ¶ added in v0.18.0
func (*HTTP) CookieJar(ctx context.Context) *HTTPCookieJar
func (*HTTP) XCookieJar ¶ added in v0.18.0
func (*HTTP) XCookieJar(ctx *context.Context) *HTTPCookieJar
type HTTPCookie ¶ added in v0.18.0
type HTTPCookieJar ¶ added in v0.18.0
type HTTPCookieJar struct {
	// contains filtered or unexported fields
}
    func (HTTPCookieJar) CookiesForURL ¶ added in v0.18.0
func (j HTTPCookieJar) CookiesForURL(url string) map[string][]string
type HTTPRequestCookie ¶ added in v0.18.0
type HTTPResponse ¶
type HTTPResponse struct {
	RemoteIP       string
	RemotePort     int
	URL            string
	Status         int
	Proto          string
	Headers        map[string]string
	Cookies        map[string][]*HTTPCookie
	Body           string
	Timings        HTTPResponseTimings
	TLSVersion     string
	TLSCipherSuite string
	OCSP           OCSP `js:"ocsp"`
	Error          string
	// contains filtered or unexported fields
}
    func (*HTTPResponse) Json ¶
func (res *HTTPResponse) Json() goja.Value
type HTTPResponseTimings ¶
type HTTPResponseTimings struct {
	Duration, Blocked, LookingUp, Connecting, Sending, Waiting, Receiving float64
}
    type URLTag ¶ added in v0.16.0
type URLTag struct {
	URL  string // http://example.com/thing/1234/
	Name string // http://example.com/thing/${}/
}
    A URLTag is a special wrapper around a URL that provides the source template for a template URL. Name is assigned as the 'name' tag. Used to group together functionally identical URLs, eg.: for (var i = 0; i < 100; i++) { http.get(url`http://example.com/thing/${id}`) }
 Click to show internal directories. 
   Click to hide internal directories.