Which code segment should you use?

You need to configure the server to self-host the bookstore’s Web API application. Which
code segment should you use?

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



Leave a Reply 10

Your email address will not be published. Required fields are marked *


MNN

MNN

C.

MapHttpRoute Method

Maps the specified route template.

Use the option with “api/…

FigArt

FigArt

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??

Overk

Overk

I also think it’s B (case study asks specifically for URL without ‘api’)

Blah

Blah

+1 – the case study doesn’t have api at the start of the URLs and pluralizes the BookController to books in the url.

Blue

Blue

Look on the MapHttpRoute specification. It is defined with api/.
I would go with C.

Iron

Iron

I’ll also go for Option: C on this one!

Paul

Paul

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.

twan

twan

reletive aurl is without api, so i think option b is correct