Answers for "post put get"

0

post get

@app.route('/setcookie', methods = ['POST', 'GET'])
def setcookie():
   if request.method == 'POST':
   user = request.form['nm']
   
   resp = make_response(render_template('readcookie.html'))
   resp.set_cookie('userID', user)
   
   return resp
Posted by: Guest on November-02-2021

Browse Popular Code Answers by Language