Is it possible to serve up a resource as both JSON and Aspx with OpenRasta?
(I'm also asking this on the OpenRasta google group)
Hey all,
I've been using OpenRasta to convert an old web application we have into something RESTful. IS it possible to serve up a resource (or specifically a list of resources) as both .aspx and JSON? I have tried this but no matter what I try I keep getting the .aspx back ... any ideas? Here's a sample configuration:
ResourceSpace.Has.ResourcesOfType<List<Valueset>>()
.AtUri("/valuesets")
.HandledBy<ValuesetHandler>(开发者_开发技巧)
.AsJsonDataContract()
.And.AsXmlDataContract()
.And.RenderedByAspx("~/Views/VauesetView.aspx")
GET /valuesets
Accept: application/json
精彩评论