We do not have a JsonpMediaTypeFormatter out of the box for beta -- you'll need to write a custom MediaTypeFormatter. The implementation should be very similar to the one we shipped on the enhancement branch on codeplex:
Do you have an ETA of when jsonp will be supported? It's a bummer not to see this here given this is suppose to be the new version yet a lot of features are missing.
tugberk_ugur...
Participant
1944 Points
1344 Posts
MVP
JSONP support and way of handling it
Feb 18, 2012 06:44 PM|LINK
I wonder how we can support JSONP with ASP.NET Web API. Do we have any out of the box implementation for this?
tweets as @tourismgeek
maggie.ying
Member
183 Points
39 Posts
Microsoft
Re: JSONP support and way of handling it
Feb 19, 2012 12:05 AM|LINK
We do not have a JsonpMediaTypeFormatter out of the box for beta -- you'll need to write a custom MediaTypeFormatter. The implementation should be very similar to the one we shipped on the enhancement branch on codeplex:
http://wcf.codeplex.com/SourceControl/changeset/view/66aa503c963c#WCFWebApi%2fprototype%2fMicrosoft.ApplicationServer.HttpEnhancements%2fMicrosoft%2fApplicationServer%2fHttp%2fJsonpMediaTypeFormatter.cs
Thanks,
Maggie Ying
tugberk_ugur...
Participant
1944 Points
1344 Posts
MVP
Re: JSONP support and way of handling it
Feb 19, 2012 09:27 AM|LINK
Nice! I'll have a look. Thanks!
tweets as @tourismgeek
elmerm
Member
2 Points
1 Post
Re: JSONP support and way of handling it
Feb 20, 2012 09:14 PM|LINK
Do you have an ETA of when jsonp will be supported? It's a bummer not to see this here given this is suppose to be the new version yet a lot of features are missing.
Christian.We...
Member
32 Points
11 Posts
Re: JSONP support and way of handling it
Feb 21, 2012 04:15 PM|LINK
You may want to try the simple JSONP handler contained here:
https://github.com/ChristianWeyer/Thinktecture.Web.Http
Microsoft MVP for Windows Azure [Architecture]
http://weblogs.thinktecture.com/cweyer
https://github.com/thinktecture/Thinktecture.Web.Http