Skip to content

Web Request Instance

Web request instances represent a singular in-progress, completed or failed web request. They are created via the Web Request Manager.

Member Variables

Variable Description Type
download_progress Download percentage, represented as a number in the range 0-1.
error

Reason why the request failed to complete.

If the server responds with a HTTP status code that represents a HTTP error (4xx/5xx), this is not considered a request error.

is_error If the request failed due to an error.
is_done If the request completed or failed. If the request failed, is_error will be set.
response_code Response HTTP status code.
text Response body.
upload_progress Upload percentage, represented as a number from 0-1.
url The request's target URL. If the request was redirected, this will still return the initial URL.

Functions

Function Name Return Description  
dispose()
dispose()

Web requests are automatically disposed of after a request completes/fails.

You may call this method to try abort a request and dispose of it early.

getResponseHeader(
getResponseHeader(...)
name)
Returns the value of the specified response header, or nil if no such header exists.
getResponseHeaders()
getResponseHeaders()
Returns the table of response headers. Keys and values are both .