aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-08-05 22:38:51 +0900
committeripknHama <ipknhama@gmail.com>2014-08-06 04:07:46 +0900
commit88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16 (patch)
tree10d89cf3d7f4754acc5f61674f16889ca73f01cb /test.py
parent9e331deaeecb619221cc0c59c69f14c77bb7c8a4 (diff)
downloadcrow-88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16.tar.gz
crow-88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16.zip
add supporing handlers with res parameter
void handler(const crow::request&, crow::response& res) { res.send(data) res.end() } https://news.ycombinator.com/item?id=8004017
Diffstat (limited to 'test.py')
-rw-r--r--test.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/test.py b/test.py
index 09d7a42..e2bf651 100644
--- a/test.py
+++ b/test.py
@@ -6,6 +6,7 @@ assert "3 bottles of beer!" == urllib.urlopen('http://localhost:18080/hello/3').
assert "100 bottles of beer!" == urllib.urlopen('http://localhost:18080/hello/100').read()
assert 400 == urllib.urlopen('http://localhost:18080/hello/500').getcode()
assert "3" == urllib.urlopen('http://localhost:18080/add_json', data='{"a":1,"b":2}').read()
+assert "3" == urllib.urlopen('http://localhost:18080/add/1/2').read()
# test persistent connection
import socket