Mercurial > repos > tabletprog
diff samples/http.tp @ 171:869399ff7faa
Merge
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 13 Aug 2013 22:01:00 -0700 |
parents | 55e0dca7d3d7 |
children |
line wrap: on
line diff
--- a/samples/http.tp Tue Aug 13 21:58:03 2013 -0700 +++ b/samples/http.tp Tue Aug 13 22:01:00 2013 -0700 @@ -5,6 +5,13 @@ server <- args get: 1 } cli <- http client: server - print: (string: (cli get: "/")) + resp <- (cli get: "/") + print: "Status: " . (resp status) . "\n" + print: "Code: " . (resp statusCode) . "\n" + print: "Headers:\n" + foreach: (resp headers) :key val { + print: key . " -> " . val . "\n" + } + print: "Body:\n" . (resp body) . "\n" } }