summaryrefslogtreecommitdiff
path: root/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-09-25 19:30:30 +0300
committerLars Wirzenius <liw@liw.fi>2016-09-25 19:30:30 +0300
commite15496ed559c07996b12ccbddcd3491408bc5b0a (patch)
tree83a0a85a8b9c35104d06b68cc1e87272cf329eaa /900-implements.yarn
parentec218d0a7dbb841796545a4b5d2b609b3002a7c8 (diff)
downloadserver-yarns-e15496ed559c07996b12ccbddcd3491408bc5b0a.tar.gz
Make aliased http request to server
Diffstat (limited to '900-implements.yarn')
-rw-r--r--900-implements.yarn8
1 files changed, 7 insertions, 1 deletions
diff --git a/900-implements.yarn b/900-implements.yarn
index a424cec..208a68f 100644
--- a/900-implements.yarn
+++ b/900-implements.yarn
@@ -10,7 +10,13 @@
## HTTP requests
IMPLEMENTS WHEN user fetches (\S+)
- pass
+ import yarnhelper
+ h = yarnhelper.YarnHelper()
+ server = h.get_variable('SERVER')
+ url = h.get_next_match()
+ status, body = h.http_get(server, url)
+ h.set_variable('http_status', status)
+ h.set_variable('http_body', body)
IMPLEMENTS THEN HTTP status is (\d+)
pass