Loading

Quipoin Menu

Learn • Practice • Grow

express-js / Build RESTful API (CRUD + Auth)
mcq
Direction: Choose the correct option

Q1.

What is a RESTful API?
A. An API that uses WebSockets
B. An API that follows REST architectural principles using HTTP methods
C. An API that requires authentication
D. An API that returns only XML
Direction: Choose the correct option

Q2.

Which HTTP status code indicates a successful resource creation (POST)?
A. 200 OK
B. 201 Created
C. 404 Not Found
D. 204 No Content
Direction: Choose the correct option

Q3.

How should a RESTful API represent the URL for a specific user with ID 5?
A. /getUser/5
B. /users/5
C. /user?id=5
D. /users?id=5
Direction: Choose the correct option

Q4.

In a RESTful API with authentication, where should the JWT be sent?
A. In the request body
B. In a cookie
C. In the URL
D. In the Authorization header
Direction: Choose the correct option

Q5.

What is the purpose of using HTTP status codes in API responses?
A. To increase speed
B. To clearly indicate the result of the request
C. To make the response look professional
D. To cache responses