Add bruno post method as an example.
This commit is contained in:
parent
9739bfe06e
commit
d677e12ed8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue