Three20 iPhone - 发送 XML-RPC 请求而不是 HTTP?

发布于 2024-08-23 20:05:29 字数 173 浏览 2 评论 0原文

我是 Three20 的新手,过去一周一直在尝试使用 Three20 开发 iPhone 应用程序。此应用程序必须访问 xmlrpc 服务器。

我知道可以接收其他格式(例如 JSON)的响应。

但是对于请求,是否可以通过 XML-RPC 发送请求,而不是提供 HTTP 类 TTURLRequest?

I am new to Three20 and have been trying to develop an iPhone app with Three20 for the past week. This app has to access to a xmlrpc server.

I know it is possible to receive responses in other formats like JSON.

But for requests, instead of the provided HTTP class TTURLRequest, is it possible to send request by XML-RPC?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡看悲欢离合 2024-08-30 20:05:29

我为 XML-RPC 连接创建了 Three20 扩展。

它在我的 Three20 前叉上。
http://github.com/ngs/ Three20/tree/master/src/ extThree20XMLRPC/

请尝试这个并反馈我。

I created three20 extention for XML-RPC connection.

It's on my three20 fork.
http://github.com/ngs/three20/tree/master/src/extThree20XMLRPC/

Please try this and feedback me.

じее 2024-08-30 20:05:29

Cocoa XML-RPC 客户端框架 似乎可以满足您的需求,尽管它使用底层 NSURLConnection 以及 Three20 使用的朋友,而不是 Three20 本身。

根据记录,XML-RPC 使用 HTTP 作为其传输层,所以我不明白为什么您不能首先将它用于此目的;主要的事情是编写一个包装底层 HTTP 传输片段的库,以便您可以更透明地调用方法。

(即,您可以设置 HTTP 标头以及请求方法(GET、POST、PUT 等),并在 HTTP 请求正文中提交数据,因此一切都可以支持它。此外,XML 本身可以是通过 NSXMLParser 类、开源 libxml2 库或其他第三方解决方案(例如 TouchXML< /a>,它是基于 libxml2 构建的)。)

最后,还有另一个 SO 问题 一般而言,关于 iPhone 上的 XML-RPC,尽管它有许多相同的答案。

Cocoa XML-RPC Client Framework appears to do what you want, although it uses the underlying NSURLConnection and friends that Three20 uses, not Three20 itself.

For the record, XML-RPC uses HTTP as its transport layer, so I don't see why you wouldn't be able to use it for that purpose in the first place; the main thing is writing a library that wraps the underlying HTTP transport pieces so you can invoke methods more transparently.

(I.e., you can set HTTP headers as well as the request method (GET, POST, PUT, etc.), and submit data in the body of an HTTP request, so everything is there to support it. Additionally, XML itself can be parsed via the NSXMLParser class, the Open Source libxml2 library, or other third-party solutions (e.g. TouchXML, which is built on libxml2).)

Lastly, there is another SO question regarding XML-RPC on the iPhone in general, although it has many of the same answers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文