โ† Web & Frontend
#7 most askedVery commonEasyHTTP & APIs

HTTP methods and status codes

New to HTTP & APIs? Learn it from scratch first
HTTP: Requests & Responses โ†’
๐Ÿข Asked in real interviews
No reports yet. Were you asked this? Be the first to say where.
I was asked this

Explain the main HTTP methods and the status-code families. What's the difference between PUT and PATCH?

๐ŸŽค Answer it out loud, then check yourself

Say your answer as if the interviewer is listening (30โ€“90 seconds). Then reveal what a strong answer covers and tick what you said.

    Try it ยท run and change it
    const res = new Response(JSON.stringify({ error: "Too many attempts" }), { status: 429, headers: { "Retry-After": "60" } });
    console.log(res.status, res.ok, res.headers.get("Retry-After"));
    
    Answer out loud first, then compare.
    Want to rehearse it?
    Answer this to the AI interviewer and get a verdict โ†’