Rest API - HTTP Status CodesWhich of the following is the correct HTTP response line for a successful resource creation?AHTTP/1.1 200 OKBHTTP/1.1 201 CreatedCHTTP/1.1 404 Not FoundDHTTP/1.1 500 Internal Server ErrorCheck Answer
Step-by-Step SolutionSolution:Step 1: Review HTTP response status lines and match to resource creationThe response line includes the HTTP version, status code, and reason phrase. 201 Created is the correct status code for successful resource creation.Final Answer:HTTP/1.1 201 Created -> Option BQuick Check:Response line for creation = 201 Created [OK]Quick Trick: 201 Created is the correct response line for creation [OK]Common Mistakes:Using 200 OK response line for creationMixing status codes and reason phrasesIncorrect HTTP version in response line
Master "HTTP Status Codes" in Rest API9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Rest API Quizzes HTTP Methods - DELETE for removing resources - Quiz 8hard HTTP Status Codes - 400 Bad Request - Quiz 13medium HTTP Status Codes - 409 Conflict - Quiz 11easy HTTP Status Codes - 400 Bad Request - Quiz 7medium Query Parameters and Filtering - Why flexible querying empowers clients - Quiz 12easy REST API Fundamentals - First API request and response - Quiz 2easy REST API Fundamentals - First API request and response - Quiz 12easy REST API Fundamentals - First API request and response - Quiz 10hard URL and Resource Design - Resource identifiers in URLs - Quiz 7medium URL and Resource Design - Noun-based resource naming - Quiz 8hard