Add bruno post method as an example.

This commit is contained in:
uggla 2015-06-26 17:53:56 +02:00
parent 9739bfe06e
commit d677e12ed8
1 changed files with 8 additions and 1 deletions

View File

@ -6,7 +6,7 @@ from flask import request
import config
# Vars
alexandria_version="0.1"
alexandria_version = "0.1"
# Configuration file
conf_file = config.AlexandriaConfiguration("alexandria.conf")
@ -35,6 +35,13 @@ def shutdown():
shutdown_server()
return 'Server shutting down...'
@app.route('/bruno', methods=['POST'])
def bruno():
coucou = "Coucou " + request.json["Server"]
#coucou = "Coucou"
return coucou
@app.route("/", methods = ["GET"])
def api_root():
global alexandria_version