Created
October 4, 2017 18:06
-
-
Save sidmutha/fdc5c88e9596ce705c54a5ba67f8895f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from src import app | |
from flask import jsonify, request | |
@app.route("/") | |
def hello(): | |
return json.dumps({"message":"Autobots Assemble"}) | |
@app.route("/<process_topic>", methods=['POST']) | |
def process_url(process_topic): | |
topic = process_topic[8:] # remove 'process-' and get topic | |
print("[Topic {}] {}".format(topic, request.json)) | |
return ('', 204) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment