To use the following code execute the below command and from postman send request to your given address followed by login
example if your address is http://127.0.0.1:5000/ then you can use http://127.0.0.1:5000/login
Python Flask Code
from flask import Flask, redirect, url_for, request
app = Flask(__name__)
@app.route(‘/success/’)
def success(name):
return ‘welcome %s’ % name
def get(user):
return (user)
def post(user):
return (user)
@app.route(‘/login’,methods = [‘POST’, ‘GET’])
def login():
if request.method == ‘POST’:
user = request.form[‘nm’]
return redirect(url_for(‘success’,name = user))
elif request.method == ‘GET’:
user = request.args.get(‘nm’)
usr = get(user)
return redirect(url_for(‘success’,name = usr))
if __name__ == ‘__main__’:
app.run(debug = True)
Oh my go᧐Ԁness! Amazing article dude! Ƭhank you, However
I am going through issues with your RSS. I don’t understand
wһy I cannot suƅscribe to it. Is there anybody getting similar
RSS iѕsues? Anybοdy who knows the solution will you kindly respond?
Thanx!!
I will check for this