Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Unassigned: Allow the customer to customize the base Uri in the ODataMediaTypeFormatter [1660]

$
0
0
When the user wants to customize the base Uri to use in OData responses, there's no easy way to do it. Make this method public virtual so that it's easy for anyone to customize the base Uri

private static Uri GetBaseAddress(HttpRequestMessage request)
{
UrlHelper urlHelper = request.GetUrlHelper() ?? new UrlHelper(request);

string baseAddress = urlHelper.ODataLink();
if (baseAddress == null)
{
throw new SerializationException(SRResources.UnableToDetermineBaseUrl);
}

return new Uri(baseAddress);
}

Or provide setters for ODataMessageWriterSettings and ODataMessageReaderSettings in the formatter.

Comments: This extensibility point is already covered by UrlHelper

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>