Query Strings via request.args
Read URL parameters after the question mark.
What Is a Query String
A query string is the part of a URL after the question mark, like ?q=cats&page=2. It carries small bits of optional input. 🔎
Where request Comes From
Flask gives you a global request object that holds everything about the incoming call. Import it once and reach for it inside any view.
from flask import requestAll lessons in this course
- Query Strings via request.args
- Form Fields via request.form
- JSON Bodies via request.get_json
- Headers, Cookies, and the Client IP