http

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule added in v0.2.2

func NewModule(proxy *config.Proxy) lua.LGFunction

Types

type Module added in v0.2.2

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

func (*Module) DownloadFile added in v0.4.0

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 added in v0.2.2

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 = "http://ip.jsontest.com/"
}) return (response, error)

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

func (*Module) Head added in v0.2.3

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