Created
August 12, 2013 17:18
-
-
Save darrelmiller/6213002 to your computer and use it in GitHub Desktop.
ApiRouter side by side with standard route.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.Routes.MapHttpRoute( | |
name: "TreeApi", | |
routeTemplate: "tree/{*path}", | |
defaults: null, | |
constraints: null, | |
handler: new ApiRouter("", new Uri("http://localhost:64921/tree")).To<FooController>()); | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment