-
1
Different request methodsTimes asked 1Official solution
SimpleHTTP methods batate hain request kya karna chahti hai. Common: GET POST PUT PATCH DELETE.
GETread/fetch. Safe, URL se. Page kholna, search.
POSTcreate/submit. Form, login.
PUTpoora replace/update. Idempotent.
PATCHpartial update.
DELETEhataana.
HEAD: sirf headers. OPTIONS: CORS preflight.
Flask: @app.route('/x', methods=['GET','POST'])
Agar methods na likho to default sirf GET.
HTML form native sirf GET/POST. PUT/DELETE JS/fetch ya hidden _method se.
GET se data fetch ho sakta hai, create nahi karna chahiye. POST se theoretically fetch ho sakta hai lekin cache/semantics galat.
DELETE fetch ke liye nahi. GET POST ka kaam officially nahi karta — side effects GET pe mat rakho.Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
2
GET vs POSTTimes asked 2Official solution
SimpleGET data read/show karta hai (idempotent). POST create/submit karta hai (form).
Example
@app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': # validate + session ... return render_template('login.html')Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
3
open notepad, n write if loop in jinjaTimes asked 1Official solution
SimpleJinja for loop list render karta hai. loop.index, else branch empty list pe.
Example
{% for u in users %} <tr><td>{{ loop.index }}</td><td>{{ u.email }}</td></tr> {% endfor %}Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet
-
4
Proctor level2_127Times asked 1Official solution
SimpleViva wrap-up hai. Short thanks + confirm submission ZIP latest hai.
Community answers
No replies yet
No community answers yet
Open My solution to be the first to share yours.
My solution
Not submitted yet