blob: 0200f3120b6ad8c173b782dd8bbc0fc65c621c9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
BEGIN {
URL = ARGV[1]; ARGV[1] = ""
if (Method == "") Method = "GET"
HttpService = "/inet/tcp/0/www.yahoo.com/80"
ORS = RS = "\r\n\r\n"
print Method " " URL "/index.html HTTP/1.0" |& HttpService
HttpService |& getline Header
print Header > "/dev/stderr"
while ((HttpService |& getline) > 0)
printf "%s", $0
close(HttpService)
}
|