Differences

This shows you the differences between two versions of the page.

Link to this comparison view

isi:laboratoare:06 [2024/11/09 21:19]
alexandru.predescu [Obiective laborator]
isi:laboratoare:06 [2024/11/11 11:43] (current)
alexandru.predescu [Obiective laborator]
Line 95: Line 95:
 5. Dupa finalizarea primului **TO DO** pentru testare descarcati postman de [[https://​www.postman.com/​downloads/​|aici]]. 5. Dupa finalizarea primului **TO DO** pentru testare descarcati postman de [[https://​www.postman.com/​downloads/​|aici]].
  
 +
 +<note tip>
 +
 +De obicei, cererile de tip GET nu conțin date în body și se parametrizează astfel:
 +
 +Exemplu cereri GET cu parametru în URL:
 +
 +''​http://​localhost:​5000/​login?​username=alex&​password=1234''​
 +
 +<code python>
 +@app.route('/​login',​ methods=['​GET'​])
 +def login():
 +    username = request.args.get('​username'​)
 +    print(username)
 +    password = request.args.get('​password'​)
 +    print(password)
 +    return jsonify({"​status":​ True})
 +</​code>​
 +
 +</​note>​
  
 === Task === === Task ===
isi/laboratoare/06.1731179954.txt.gz · Last modified: 2024/11/09 21:19 by alexandru.predescu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0