1

Closed

Provide an easier extension to supply route specific message handler

description

Currently a user has to do the following for inserting a per-route message handler. Provide an easier extension where we wire up the default HttpControllerDispatcher ourselves.
config.Routes.MapODataRoute(
                    routeName: "OData",
                    routePrefix: null,
                    model: ModelBuilder.GetEdmModel(), handler: HttpClientFactory.CreatePipeline(new HttpControllerDispatcher(config),
                                new DelegatingHandler[] { new ExcelCompliantMessageHandler() }));
Closed Dec 30, 2013 at 5:52 PM by eilonlipton
This is not currently a high-pri scenario. We will reconsider if we hear about additional scenarios that necessitate this.

comments

HongmeiG wrote Mar 28, 2013 at 8:27 PM

I think we don't have MapODataRoute which takes a handler. That is tracked by the other bug. So it is for MapHttpRoute.

HongmeiG wrote Mar 28, 2013 at 8:31 PM

We could consider add an overload which takes in the instance of ExcelCompliantMessageHandler and auto wire HttpControllerDispatcher if its Inner is empty.