Can XHRRequestHeaderMapping be made public?

Topics: ASP.NET Web API
Mar 31, 2012 at 9:46 PM

Today XHRRequestHeaderMapping is internal and sealed. Is it possible to make it public?

I'm implementing a JsonMediaTypeFormatter that uses ServiceStack.Text and I'll have to write the XHR header mapping myself, instead of using the one already present in System.Net.Http.Formatting.


Please let me know if the team has no objection of making it public and I can send a pull request.

Mar 31, 2012 at 10:10 PM

I don’t see a reason why it couldn’t be public and unsealed.

Henrik

From: pedroreys [email removed]
Sent: Saturday, March 31, 2012 1:47 PM
To: Henrik Frystyk Nielsen
Subject: Can XHRRequestHeaderMapping be made public? [ASPNETWebStack:350758]

From: pedroreys

Today XHRRequestHeaderMapping is internal and sealed. Is it possible to make it public?

I'm implementing a JsonMediaTypeFormatter that uses ServiceStack.Text and I'll have to write the XHR header mapping myself, instead of using the one already present in System.Net.Http.Formatting.


Please let me know if the team has no objection of making it public and I can send a pull request.

May 7, 2012 at 11:39 PM

Updated to being public and changed name to make FxCop happy -- see [1]:

Addressing user feedback on making XHRRequestHeaderMapping public rather than internal sealed. The functionality is useful in other contexts and does not have to be internal.

Also renamed to XmlHttpRequestHeaderMapping to avoid fxcop warning on type name and added missing test.

Henrik

[1] http://aspnetwebstack.codeplex.com/SourceControl/changeset/changes/60edde71ae20

May 7, 2012 at 11:49 PM

Thanks, Henrik