http

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DELETE

func DELETE(ctx context.Context, args ...core.Value) (core.Value, error)

DELETE makes a HTTP DELETE request. @params params (Object) - request parameters.

  • url (String) - Target url
  • body (Binary) - POST data
  • headers (Object) optional - HTTP headers

func GET

func GET(ctx context.Context, args ...core.Value) (core.Value, error)

GET makes a HTTP GET request. @params url or (String) - target url or parameters.

  • url (String) - Target url
  • headers (Object) optional - HTTP headers

func POST

func POST(ctx context.Context, args ...core.Value) (core.Value, error)

POST makes a POST request. @params params (Object) - request parameters.

  • url (String) - Target url
  • body (Binary) - POST data
  • headers (Object) optional - HTTP headers

func PUT

func PUT(ctx context.Context, args ...core.Value) (core.Value, error)

PUT makes a PUT HTTP request. @params params (Object) - request parameters.

  • url (String) - Target url.
  • body (Binary) - POST data.
  • headers (Object) optional - HTTP headers.

func REQUEST

func REQUEST(ctx context.Context, args ...core.Value) (core.Value, error)

REQUEST makes a HTTP request. @params params (Object) - request parameters.

  • method (String) - HTTP method.
  • url (String) - Target url.
  • body (Binary) - POST data.
  • headers (Object) optional - HTTP headers.

func RegisterLib

func RegisterLib(ns core.Namespace) error

RegisterLib register `HTTP` namespace functions.

Types

type Params

type Params struct {
	Method  values.String
	URL     values.String
	Headers *values.Object
	Body    values.Binary
}

Jump to

Keyboard shortcuts

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