On 11/27/2012 01:56 PM, maarten van damme wrote:
Haven't looked at vibe.d yet because it looked more like a library for
writing web apps and normal sockets should be enough.
Didn't know about Tango, I'll try deciphering the original d1 module.
... I mean no offense, but that sounds painful.
vibe.d is very modular, just import what you need.
I hate to push it, but it has very good documentation and examples.
Its designed for web apps, but it makes a nice little web library as well.
import vibe.vibe;
void main()
{
auto client = new HttpClient;
client.connect("www.google.com", 80);
auto res = client.request((req){
req.url = "/";
});
logInfo("Response: %d", res.statusCode);
foreach( k, v; res.headers )
logInfo("Header: %s: %s", k, v);
(new NullOutputStream).write(res.bodyReader);
client.disconnect();
}