mirror of https://github.com/dapr/quickstarts.git
16 lines
325 B
Python
16 lines
325 B
Python
from flask import Flask, request
|
|
import json
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route('/orders', methods=['POST'])
|
|
def getOrder():
|
|
data = request.json
|
|
print('Order received : ' + json.dumps(data), flush=True)
|
|
return json.dumps({'success': True}), 200, {
|
|
'ContentType': 'application/json'}
|
|
|
|
|
|
app.run(port=7001)
|