Documentation ¶
Index ¶
Constants ¶
View Source
const ( // default http User Agent DefaultUserAgent = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36` // default http timeout DefaultTimeout = 2 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func DoRequest ¶
DoRequest lua http_client_ud:do_request() http_client_ud:do_request(http_request_ud) returns (response, error)
response: { code = http_code (200, 201, ..., 500, ...), body = string headers = table }
func New ¶
http.client(config) returns (user data, error) config table:
{ proxy="http(s)://<user>:<password>@host:<port>", timeout= 10, insecure_ssl=false, user_agent = "gopher-lua", basic_auth_user = "", basic_auth_password = "", headers = {"key"="value"}, debug = false, }
func NewFileRequest ¶
http.filerequest(url, files, params) returns user-data, error
func NewRequest ¶
http.request(verb, url, body) returns user-data, error
Types ¶
Click to show internal directories.
Click to hide internal directories.