Skip to content

Instantly share code, notes, and snippets.

@viveksb007
Created February 1, 2018 11:57
Show Gist options
  • Save viveksb007/900a097a8255869a7c64a9f027c34196 to your computer and use it in GitHub Desktop.
Save viveksb007/900a097a8255869a7c64a9f027c34196 to your computer and use it in GitHub Desktop.
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