diff options
author | ipknHama <ipknhama@gmail.com> | 2014-08-05 22:38:51 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-08-06 04:07:46 +0900 |
commit | 88cc6079cb2ba9790a2d8bb9a5955006bfcc7a16 (patch) | |
tree | 10d89cf3d7f4754acc5f61674f16889ca73f01cb /test.py | |
parent | 9e331deaeecb619221cc0c59c69f14c77bb7c8a4 (diff) | |
download | crow-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.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |