On Mon, 06 May 2013 07:08:10 GMT, Sönke Ludwig wrote:

On Sun, 05 May 2013 13:26:34 GMT, Matthew Fong wrote:

Hey,

I was just checking the repo and saw that there is a file called "todo.txt" and I was curious what "support pipelining for HttpClient" means, because I was looking to maybe improve the HttpClient as I would like to use it for a project of my own.

Any help would be appreciated.

Thanks

The idea is to change HttpClient to use a separate task for writing a number of requests in sequence, while reading the responses in another task (as opposed to performing all of these requests in parallel on different connections, or performing completely sequenced requests).

I think this needs an addition to the API, as this seems like something that needs to be manually tuned. I haven't looked at how other frameworks do this, but one possibility would be a HttpClient.request method that takes a list of URLs and then calls the request/response callbacks for each URL and performs the pipelined requests before returning to the caller.

Hmm... ok. I'm not sure if I fully understood that, so please if you think I misunderstood you, let me know.
I still have a few questions:

  1. What use would this have? I can't come up with an example scenario where you would want to "bulk" request HTTP.
  2. The current API allows one to use a callback to modify the request headers. When passing many requests though, you would probably want to customize each request on their own, requiring a different callback. Could this be solved with an associative array for example?

Thanks in advance