EliasZone
My notes on programming.
Friday, July 29, 2016
Secret sauce for your webapi - to always return json formatted result
Add this to your App_Start\RegisterWebAPIRoutes.cs file or wherever you happen to register your webapi routes
config.Formatters.Insert(0, new JsonpMediaTypeFormatter());
reference: http://stackoverflow.com/questions/10514047/how-do-i-handle-jsonp-with-webapi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment