- Documentation
- Server functions
- abortRemoteRequest
Function
abortRemoteRequest
Aborts a running HTTP request. In the current server version it cannot be aborted yet: the function returns false with a warning, and the request ends by itself after the fetchRemote timeout.
Syntax
bool abortRemoteRequest(request theRequest)Arguments
theRequestrequest- The request.
Returns
Currently false.
Example
for _, request in ipairs(getRemoteRequests()) do
abortRemoteRequest(request)
end
See also
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.getRemoteRequestsReturns the running HTTP requests (of every resource or one). In the current server version the list is empty.