【发布时间】:2013-01-14 06:48:48
【问题描述】:
我一直在尝试寻找有关如何对来自 wcf 服务的请求进行编码的在线文章/教程。我已将以下 Web 服务上传到我的服务器:
[ServiceContract]
public interface IUserAccountService
{
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "UserLogIn?id={email}&password={password}")]
AuthenticationToken UserLogIn(string email, string password);
}
我对我一直在寻找的与之相关的文章或 SO 问题感到非常困惑:
例如:
-http://stackoverflow.com/questions/1557040/objective-c-best-way-to-access-rest-api-on-your-iphone
-http://stackoverflow.com/questions/8650296/nsjsonserialization-parsing-response-data
最后偶然发现了这个:
http://iam.fahrni.ws/2011/10/16/objective-c-rest-and-json/
所以我的问题是,我真的需要使用 restful 框架来调用 api 吗?如果是这样,哪个更推荐 - ASIHttpRequest 或 RestKit 或 AFNetworking?或者我可以使用我提到的最后一个链接自己简单地做吗?我真的不知道从哪里开始。
感谢您的宝贵时间。
【问题讨论】:
标签: objective-c wcf wcf-data-services nsjsonserialization