You need to configure the server to self-host the bookstore’s Web API application. Which
code segment should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
You need to configure the server to self-host the bookstore’s Web API application. Which
code segment should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
C.
MapHttpRoute Method
Maps the specified route template.
Use the option with “api/…
I think this case study give’s you an example of how the relative URLs should look, and from memory they DO NOT have ‘api’ at the start, so I would answer with B, but I don’t know if this is a trick question or not. Default WebApi routes dictate a “/api/” default so I could be wrong.
Anyone else think the same??
I also think it’s B (case study asks specifically for URL without ‘api’)
+1 – the case study doesn’t have api at the start of the URLs and pluralizes the BookController to books in the url.
Look on the MapHttpRoute specification. It is defined with api/.
I would go with C.
I’ll also go for Option: C on this one!
In the case description the RESTful API’s don’t specify the string “api” for the Relative URL’s.
As such, I would go for option B.
reletive aurl is without api, so i think option b is correct
Looks like C
https://www.asp.net/web-api/overview/web-api-routing-and-actions/routing-and-action-selection
C