Reputation: 15039
I have a Monotouch project that today uses WCF Web Services to get data. Now I want to migrate it in order to start using ASP.NET Web Api Json.
Does anyone know how can I send a viewmodel data from a ASP.NET Web Api and then read it in monotouch?
Thanks for the help in advance.
Upvotes: 4
Views: 1848
Reputation: 26505
I think you should read this Xamarin article.
In general, Web API is just standard HTTP passing either XML or JSON back and forth. There is not necessarily a client framework accessing it--you can consume it with raw HttpWebRequests
or the equivalent in whichever programming language you are using.
Considering that, your options are:
HttpWebRequest
calls, and format the XML or JSON for the requests and responses yourself (you can use the .Net BCL to do this or other open source projects)I tend to do the former, just because I like fine grained control of what is going on. #1 might be easier for you though.
Upvotes: 2