Threaded HTTP request manager.
The amount of threads is controlled by server.urlThreads
configuration variable.
Note: This class uses the snipe.lib.Util.urlRequest
method as a base.
send (srv:Server, project:ProjectInfo, clientID:Int, url:String, method:String, params:Dynamic, responseFunc:Int ‑> String ‑> Dynamic ‑> Void, responseParams:Dynamic):Void
Makes an HTTP request in separate thread. The response will be handled in the given function.
Parameters:
server
Server originator.
project
Project originator.
clientID
Client ID.
url
URL string.
method
HTTP request method, "get" or "post".
params
HTTP request parameters object.
If the object contains field "_postData" (String), it will be used to set POST request data.
If the object contains field "_headers" (Map
responseFunc
Response handler.
Accepts the following arguments: client ID, HTTP response string, additional response handler parameters (responseParams
)
responseParams
Additional response handler parameters.