Extend Request Parameters to add Body & Method (#325)

This commit is contained in:
Simon Caron
2021-12-29 17:18:29 -05:00
committed by GitHub
parent e3bcd8c9bf
commit dfcae4ee64
9 changed files with 282 additions and 91 deletions

View File

@@ -56,6 +56,21 @@ def live_server_setup(live_server):
return "\n".join(output)
# Just return the body in the request
@live_server.app.route('/test-body', methods=['POST', 'GET'])
def test_body():
from flask import request
return request.data
# Just return the verb in the request
@live_server.app.route('/test-method', methods=['POST', 'GET', 'PATCH'])
def test_method():
from flask import request
return request.method
# Where we POST to as a notification
@live_server.app.route('/test_notification_endpoint', methods=['POST', 'GET'])