- Documentation
- Server functions
- getRemoteRequests
Function
getRemoteRequests
Returns the running HTTP requests (of every resource or one). In the current server version the list is empty.
Syntax
table getRemoteRequests([resource theResource])Arguments
theResourceresource, optional- The resource.
Returns
A table of requests (currently empty).
Example
outputServerLog("Zapytań HTTP: " .. #getRemoteRequests())
See also
getRemoteRequestInfoReturns the state of an HTTP request: the address, progress and size. In the current server version it returnsfalse.fetchRemoteSends an HTTP or HTTPS request and passes the response to a callback without blocking the server. WithpostDatait makes a POST request, without it a GET. The function gets the response body and a code:0= success, the HTTP status number on a server error,-1when there is no connection or it timed out.