http

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const ModuleName = "http"

Variables

View Source
var (
	// ModuleInit represents init for module http.
	ModuleInit gad.ModuleInitFunc = func(module *gad.Module, c gad.Call) (err error) {
		spec := module.Spec
		module.Data = gad.Dict{
			"url": &gad.Function{
				Module:   spec,
				FuncName: "url",
				Value:    URL,
			},
			"header": &gad.Function{
				Module:   spec,
				FuncName: "header",
				Value:    Header,
			},
			"request": &gad.Function{
				Module:   spec,
				FuncName: "request",
				Value:    Request,
			},
			"get": &gad.Function{
				Module:   spec,
				FuncName: "get",
				Value:    Get,
			},
			"exec": gad.MustNewReflectValue(http.DefaultClient.Do),
		}
		return
	}
)

Functions

func Get

func Get(call gad.Call) (_ gad.Object, err error)
func Header(call gad.Call) (gad.Object, error)

func Request

func Request(call gad.Call) (_ gad.Object, err error)

func URL

func URL(call gad.Call) (_ gad.Object, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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