The current TwitchPlugin.
Numerical ID to use as key when storing the response in the bucket AA.
A QueryResponse as constructed by other parts of the program.
immutable id = plugin.responseBucket.uniqueKey; immutable url = "https://api.twitch.tv/helix/users?login=zorael"; plugin.getNextWorkerTid().send( id, url, plugin.transient.authorizationBearer, HTTPVerb.get, cast(ubyte[])null, string.init); delay(plugin, plugin.transient.approximateQueryTime.msecs, yield: true); immutable response = waitForQueryResponse(plugin, id, url); // response.str is the response body assert(id !in plugin.responseBucket);
Common code to wait for a query response.
Merely spins and monitors the shared TwitchPlugin.responseBucket
associative array for when a response has arrived, and then returns it.
Times out after a hardcoded Timeout.httpGET if nothing was received.
Note: Must be called from inside a Fiber.