Commit fafb5750 authored by Sli's avatar Sli

C'est pas grand chose mais on peut récupérer du json depuis le serveur

parent 28ccbdd6
......@@ -3,13 +3,20 @@
# @Author: klmp200
# @Date: 2016-07-03 17:57:28
# @Last Modified by: klmp200
# @Last Modified time: 2016-07-03 18:11:45
# @Last Modified time: 2016-07-03 22:32:39
from bottle import route, static_file, run
from bottle import route, static_file, run, request, template
def getKeys():
def GetKeys():
return static_file("keys.json", root="../data/")
run(host='localhost', port=8080)
@route('/validate', method='POST')
def Validate():
data = request.json
return template('<p>id: {{id}}, type: {{type}}</p>', id=data['id'], type=data['type'])
run(host='localhost', port=8080, debug=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment