Questions
- Which of the following HTTP verbs is recommended for creating a resource?
a.
GET
b.
POST
c.
DELETE
d.
PUT
- Which of the following HTTP status codes represents
No Content
?a.
200
b.
201
c.
202
d.
204
- Which of the following middlewares is used to configure routing?
a.
UseDeveloperExceptionPage()
b.
UseHttpsRedirection()
c.
UseRouting()
d.
UseAuthorization()
- If a controller is annotated with the
[ApiController]
attribute, do I need to classModelState.IsValid
explicitly in each action method?a. Yes, model validation isn't part of the
ApiController
attribute, hence, you need to callModelState.Valid
in each action method.b. No, model validation is handled as part of the
ApiController
attribute, hence,ModelState.Valid
is triggered automatically for all action items.