http

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2017 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct{}

func (*HTTP) Batch

func (http *HTTP) Batch(ctx context.Context, reqsV goja.Value) (goja.Value, error)

func (*HTTP) Del

func (http *HTTP) Del(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Get

func (http *HTTP) Get(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Head

func (http *HTTP) Head(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Patch

func (http *HTTP) Patch(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Post

func (http *HTTP) Post(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Put

func (http *HTTP) Put(ctx context.Context, url string, args ...goja.Value) (*HTTPResponse, error)

func (*HTTP) Request

func (*HTTP) Request(ctx context.Context, method, url string, args ...goja.Value) (*HTTPResponse, error)

type HTTPResponse

type HTTPResponse struct {
	RemoteIP   string
	RemotePort int
	URL        string
	Status     int
	Headers    map[string]string
	Body       string
	Timings    HTTPResponseTimings
	// contains filtered or unexported fields
}

func (*HTTPResponse) Html

func (res *HTTPResponse) Html(selector ...string) html.Selection

func (*HTTPResponse) Json

func (res *HTTPResponse) Json() goja.Value

type HTTPResponseTimings

type HTTPResponseTimings struct {
	Duration, Blocked, LookingUp, Connecting, Sending, Waiting, Receiving float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL