dlang-requests v0.4.0 released.

Major new feature - threaded request pool, which works like InputRange. You can write code like this:

         map!(n => "%d".format(n).representation).
map!(d => Job("http://httpbin.org/post";).method("POST").data(d)).
         filter!(r => r.code == 200).
         each!(r => writeln(cast(string)r.data));

You can supply requests to different hosts/ports, and Pool object will run your requests in parallel, trying to reduce response delay by routing each request to proper keep-alive connection.

Any InputRange with front() type Job can be supplied to pool. Pool produce InputRange of Result's.

Another improvement related to FTP authentication. You can use same method (rq.authenticator) as for HTTP requests to avoid problems when login/password contains reserved symbols (like "@").

If you have any ideas to implement, or issues to report - you are welcome to project page https://github.com/ikod/dlang-requests

Best regards!

Reply via email to