digitalmars.D.announce - dlang-requests 0.4.0 released
- ikod (22/22) Dec 29 2016 Hi,
- Andrea Fontana (2/6) Dec 30 2016 Nice feature!
Hi, dlang-requests v0.4.0 released. Major new feature - threaded request pool, which works like InputRange. You can write code like this: iota(10). map!(n => "%d".format(n).representation). map!(d => Job("http://httpbin.org/post").method("POST").data(d)). pool(5). 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!
Dec 29 2016
On Thursday, 29 December 2016 at 10:22:24 UTC, ikod wrote:Hi, dlang-requests v0.4.0 released. Major new feature - threaded request pool, which works like InputRange. You can write code like this:Nice feature!
Dec 30 2016