Documentation
      ¶
    
    
  
    
  
    Index ¶
- type HTTP
 - func (http *HTTP) Batch(ctx context.Context, reqsV goja.Value) (goja.Value, error)
 - 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
 
- type HTTPResponse
 - type HTTPResponseTimings
 - type URLTag
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTP ¶
type HTTP struct{}
    type HTTPResponse ¶
type HTTPResponse struct {
	RemoteIP   string
	RemotePort int
	URL        string
	Status     int
	Proto      string
	Headers    map[string]string
	Body       string
	Timings    HTTPResponseTimings
	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.