Exemple #1
0
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"
Exemple #2
0
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"
Exemple #3
0
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)
Exemple #4
0
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)