ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 175 - DVA-C02 discussion

Report
Export

A developer is testing a RESTful application that is deployed by using Amazon API Gateway and AWS Lambda When the developer tests the user login by using credentials that are not valid, the developer receives an HTTP 405 METHOD_NOT_ALLOWED error The developer has verified that the test is sending the correct request for the resource

Which HTTP error should the application return in response to the request?

A.
HTTP 401
Answers
A.
HTTP 401
B.
HTTP 404
Answers
B.
HTTP 404
C.
HTTP 503
Answers
C.
HTTP 503
D.
HTTP 505
Answers
D.
HTTP 505
Suggested answer: A

Explanation:

HTTP Status Codes:Each HTTP status code has a specific meaning in RESTful APIs.

HTTP 405 (Method Not Allowed):Indicates that the request method (e.g., POST) is not supported for the specified resource.

HTTP 401 (Unauthorized):Represents a failure to authenticate, which is the appropriate response for invalid login credentials.

HTTP Status Codes:https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

asked 16/09/2024
Kajenthiran Varnamyilvaganam
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first