Bird
0
0

In an interactive API explorer, you send a POST request to /login with correct credentials. What is the expected response status code?

medium📝 Predict Output Q13 of 15
Rest API - API Documentation
In an interactive API explorer, you send a POST request to /login with correct credentials. What is the expected response status code?
A200 OK
B404 Not Found
C500 Internal Server Error
D401 Unauthorized
Step-by-Step Solution
Solution:
  1. Step 1: Understand POST /login behavior

    POST /login with correct credentials usually returns 200 OK indicating success.
  2. Step 2: Review other status codes

    404 means endpoint missing, 500 means server error, 401 means wrong credentials.
  3. Final Answer:

    200 OK -> Option A
  4. Quick Check:

    Successful login = 200 OK [OK]
Quick Trick: Successful POST returns 200 OK status [OK]
Common Mistakes:
MISTAKES
  • Choosing 401 for correct credentials
  • Confusing 404 with login failure
  • Assuming server error on success

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes