Receiving Post Requests from an external source using the Bottle framework Python -
i beginning use python bottle library basic web apps. wondering if there way receive http post requests server running on same lan.
for example if have server running server.py:
app = bottle() @app.route('/hello') def stranger_hello(): return('hello, stranger') @app.post('/hello') def hello(name): return('hello, ', name) run(app, host = '192.168.1.14', port = 8888)
and have client script running on (or same) device on same lan client.py:
requests.post('http://192.168.1.14:8888', 'steve')
is possible have page @ 192.168.1.14:8888/hello
'hello, stranger'
default, receive request posted client.py , change 'hello, steve'
? believe there's way using socket framework's recv() function, possible using bottle?
Comments
Post a Comment