Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask return error response

@app.route('/')
def index():
    resp = make_response("Record not found", 400)
    resp.headers['X-Something'] = 'A value'
    return resp
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #return #error #response
ADD COMMENT
Topic
Name
3+1 =