http

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Preload added in v0.8.0

func Preload(L *lua.LState, proxy *config.Proxy)

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

func (*Module) DownloadFile

func (m *Module) DownloadFile(L *lua.LState) int

DownloadFile performs a http get request to write stream to a file. @param url string @param headers table @return err string local http = require("http")

	http.download_file({
	    url = "http://ip.jsontest.com/"
     headers = {}
	}, "/usr/path/file/") return error

func (*Module) Get

func (m *Module) Get(L *lua.LState) int

Get performs a http get request @param url string @param headers table @return resp table @return err string local http = require("http")

http.get({
    url = "https://httpbin.org/json"
}) return (response, error)

response : {
    body = "",
    status_code = 200,
    headers = table
}

func (*Module) Head

func (m *Module) Head(L *lua.LState) int

Jump to

Keyboard shortcuts

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