Last active
December 17, 2015 06:09
-
-
Save beyond-code-github/5563629 to your computer and use it in GitHub Desktop.
Removal of the XML formatter
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
public static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
var xmlFormatter = config.Formatters.XmlFormatter; | |
config.Formatters.Remove(xmlFormatter); | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); | |
config.EnableSystemDiagnosticsTracing(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment