Created
February 1, 2018 11:57
-
-
Save viveksb007/900a097a8255869a7c64a9f027c34196 to your computer and use it in GitHub Desktop.
This file contains 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 flask import request | |
@app.route('/check, methods=['GET', 'POST', 'PUT', 'DELETE']) | |
def check(): | |
if request.method == 'GET': | |
return "REQUEST TYPE: GET" | |
elif request.method == 'POST': | |
return "REQUEST TYPE: POST" | |
elif request.method == 'PUT': | |
return "REQUEST TYPE: PUT" | |
elif request.method == 'DELETE': | |
return "REQUEST TYPE: DELETE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment