![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The url request interface.
The IUrlRequest object can be created by the IWebControl object.
Send a url-request with http method GET. When posting a url-request the IsPending() state is true. If the url-request was successful the WasFinished() state is true and the response data can be accessed by GetResponseData().
Boolean SendGet(String url, Number timeout)
url | The url string to send to. |
timeout | The request timeout in seconds. |
Send a url-request with http method POST. When posting a url-request the IsPending() state is true. If the url-request was successful the WasFinished() state is true and the response data can be accessed by GetResponseData().
If the url is redirected, the POST is cancelled and WasRejected() state is true.
Boolean SendPost(String url, Murl.Data body, String contentType, Number timeout)
url | The url string to send to. |
body | The body data to send. |
contentType | The string for the "Content-Type" http header field. |
timeout | The request timeout in seconds. |
Get the url-request string.
String GetUrlString()
Get the url-request response data. The data is available if WasFinished() returns true.
Murl.Data GetResponseData()
Get the current response data size. The size is updated while receiving data asynchronous.
Integer GetCurrentDataSize()
Release the response data. Releasing the data can be performed only if the url-request is not pending.
Boolean ReleaseData()
Check if the url-request is pending.
Boolean IsPending()
Check if the url-request was finished in the most recent tick.
Boolean WasFinished()
Check if the url-request was rejected in the most recent tick.
Boolean WasRejected()