Skip to content

http.post

starkos edited this page Apr 10, 2021 · 5 revisions

⚠️ We have a new website! Visit now for the most update to date documentation.
       This wiki is no longer being maintained.


Perform a HTTP POST request to the specified URL.

http.post(url, data, { options })

Parameters

url is the URL to POST to.

data is a string containing the data to post.

options is a table of options used for this HTTP request.

Return Values

There are three return values.

resource, result_str, response_code = http.post(url, data, { options })
  • resource is the content that was retrieved or nil if it could not be retrieved.
  • result_str is set to "OK" if successful or contains a description of the failure.
  • result_code is the HTTP result code of the get.

Examples

local resource, result_str, response_code = http.post("http://example.com/api.json", "somedata")

Availability

Premake 5.0 or later.

See Also

Clone this wiki locally