Skip to main content

client:do_request

Last updated March 2020

Name

client:do_request — Perform an HTTP request

Synopsis

require('msys.http.client')

client:do_request(type, url, data);

type: string
url: string
data: string (optional)

Description

Perform an HTTP request. The legal values for the type parameter are as follows:

  • GET

  • POST

  • PUT

  • DELETE

The url parameter defines the URL that will process the request.

The data parameter does not need to be provided when type is GET.

function httpclient_test_post(url, postdata)
  client:set_header("Content-Type: text/xml; charset=utf-8");
  client:do_request("POST", url, postdata);
end

See Also

Was this page helpful?