简体   繁体   English

从 iOS 应用程序向 RESTful Web 服务发送数据

[英]Sending data to RESTful web services from iOS app

I am facing a challenge to upload & download data, to and from the server using RESTful web services.我面临着使用 RESTful Web 服务向服务器上传和下载数据的挑战。

Is it possible to use a RESTful service client, if possible any way to achieve that in an iOS app to send data to the service.是否可以使用 RESTful 服务客户端,如果可能的话,可以通过任何方式在 iOS 应用程序中实现它以将数据发送到服务。

@Ajay: As Claus mentioned there are number of public frameworks/wrappers are there, you can use them for RESTful service interaction from your code. @Ajay:正如 Claus 提到的,那里有许多公共框架/包装器,您可以将它们用于代码中的 RESTful 服务交互。 The one I frequently use is ASIHttpRequest , quite handy and easy to use.我经常使用的是ASIHttpRequest ,非常方便且易于使用。 There are enough examples out there with ASIHttpRequest you can use it as reference. ASIHttpRequest有足够多的示例,您可以将其用作参考。

Let me know if that helps.如果这有帮助,请告诉我。

You question is not clear.你的问题不清楚。 Do you need to push data from the server to the iOS app using a REST service?您是否需要使用 REST 服务将数据从服务器推送到 iOS 应用程序? If so, REST does not provide an interface for push.如果是这样,REST 不提供用于推送的接口。 (It only provides a client->server Create/Read/Update/Delete API). (它只提供客户端->服务器创建/读取/更新/删除API)。

Take a look at ASIHTTPRequest or use RestKit for some more advanced stuff!看看 ASIHTTPRequest 或使用 RestKit 来获取一些更高级的东西!

RestKit works really nice! RestKit 真的很好用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM