1from flask import *
2app = Flask(__name__)
3
4
5@app.route('/login',methods = ['GET'])
6def login():
7 uname=request.args.get('uname')
8 passwrd=request.args.get('pass')
9 if uname=="ayush" and passwrd=="google":
10 return "Welcome %s" %uname
11
12if __name__ == '__main__':
13 app.run(debug = True)
14
15# query
16# GET: http://localhost:8080/login?uname=ayush&pass=google