Skip to main content
better code highlightning and formatted link description
Source Link
colidyre
  • 4.9k
  • 12
  • 46
  • 65

Use request.args.get(param) request.args.get(param), for example:

http://10.1.1.1:5000/login?username=alex&password=pw1

http://10.1.1.1:5000/login?username=alex&password=pw1 
@app.route('/login', methods=['GET', 'POST']) def login(): username = request.args.get('username') print(username) password = request.args.get('password') print(password) 

Below is the ref link:

enterHere is the referenced link description hereto the code.

Use request.args.get(param) :

http://10.1.1.1:5000/login?username=alex&password=pw1

@app.route('/login', methods=['GET', 'POST']) def login(): username = request.args.get('username') print(username) password = request.args.get('password') print(password) 

Below is the ref link:

enter link description here

Use request.args.get(param), for example:

http://10.1.1.1:5000/login?username=alex&password=pw1 
@app.route('/login', methods=['GET', 'POST']) def login(): username = request.args.get('username') print(username) password = request.args.get('password') print(password) 

Here is the referenced link to the code.

Source Link

Use request.args.get(param) :

http://10.1.1.1:5000/login?username=alex&password=pw1

@app.route('/login', methods=['GET', 'POST']) def login(): username = request.args.get('username') print(username) password = request.args.get('password') print(password) 

Below is the ref link:

enter link description here