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
10 Comments on “Which code segment should you use?”
MNNsays:
C.
MapHttpRoute Method
Maps the specified route template.
Use the option with “api/…
0
0
FigArtsays:
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??
0
0
Overksays:
I also think it’s B (case study asks specifically for URL without ‘api’)
0
0
Blahsays:
+1 – the case study doesn’t have api at the start of the URLs and pluralizes the BookController to books in the url.
0
0
Bluesays:
Look on the MapHttpRoute specification. It is defined with api/.
I would go with C.
0
0
Ironsays:
I’ll also go for Option: C on this one!
0
0
Paulsays:
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.
0
0
twansays:
reletive aurl is without api, so i think option b is correct
C.
MapHttpRoute Method
Maps the specified route template.
Use the option with “api/…
0
0
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??
0
0
I also think it’s B (case study asks specifically for URL without ‘api’)
0
0
+1 – the case study doesn’t have api at the start of the URLs and pluralizes the BookController to books in the url.
0
0
Look on the MapHttpRoute specification. It is defined with api/.
I would go with C.
0
0
I’ll also go for Option: C on this one!
0
0
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.
0
0
reletive aurl is without api, so i think option b is correct
0
0
Looks like C
https://www.asp.net/web-api/overview/web-api-routing-and-actions/routing-and-action-selection
0
0
C
0
0