def functions_names_must_be_unique(): if request.method == 'POST': return "you made a POST request" # this is an example how to use logger logger.warning("warning! you make a GET REQUEST!") return "you made a GET request"
def functions_names_must_be_unique(): if request.method == "POST": return "you made a POST request" # this is an example how to use logger logger.warning("warning! you make a GET REQUEST!") return "you made a GET request"
def testing_json(): # do we need to check if the request is POST ? no, because we already specified it in the methods data = request.data try: dataDict = json.loads(data) except ValueError, ex: logger.warning("Are you sending a json file ? " + str(ex)) abort(404)