Closed
Description
I am working on a project which will make a lot of connections to external APIs and I need to queue the requests so that I can limit the number of active requests. This is needed to manage the load on the API (also may be useful for APIs that enforce a request limit).
For this reason I want to build the request and attach all event handlers, also write some data, but not yet send it.
Currently write()
will directly open the connection and send the data.
Lines 103 to 107 in d779a3b
I suggest to add a method that allows adding data to $pendingWrites
without sending the request.