summaryrefslogtreecommitdiff
path: root/helpers/testnet.awk
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/testnet.awk')
-rw-r--r--helpers/testnet.awk12
1 files changed, 12 insertions, 0 deletions
diff --git a/helpers/testnet.awk b/helpers/testnet.awk
new file mode 100644
index 00000000..0200f312
--- /dev/null
+++ b/helpers/testnet.awk
@@ -0,0 +1,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)
+ }