Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
4
Task/HTTP/D/http-1.d
Normal file
4
Task/HTTP/D/http-1.d
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
void main() {
|
||||
import std.stdio, std.net.curl;
|
||||
writeln(get("http://google.com"));
|
||||
}
|
||||
6
Task/HTTP/D/http-2.d
Normal file
6
Task/HTTP/D/http-2.d
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import tango.io.Console;
|
||||
import tango.net.http.HttpGet;
|
||||
|
||||
void main() {
|
||||
Cout.stream.copy( (new HttpGet("http://google.com")).open );
|
||||
}
|
||||
10
Task/HTTP/D/http-3.d
Normal file
10
Task/HTTP/D/http-3.d
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import tango.io.Console;
|
||||
import tango.net.InternetAddress;
|
||||
import tango.net.device.Socket;
|
||||
|
||||
void main() {
|
||||
auto site = new Socket;
|
||||
site.connect (new InternetAddress("google.com",80)).write ("GET / HTTP/1.0\n\n");
|
||||
|
||||
Cout.stream.copy (site);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue