Android 中的等效类
android 中是否有等效的 NSURLRequest
(iOS)?那么我可以扩展我的类并获取实用方法吗?谢谢。
Is there and equivalent NSURLRequest
(iOS) in android? So i can extend my class and gets the utility methods? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Apache
HTTPClient
在 Eclair 和 Froyo 上的错误较少。它是这些版本的最佳选择。并且根据android团队的说法你应该使用< a href="http://developer.android.com/reference/java/net/HttpURLConnection.html" rel="nofollow">
HttpURLConnection
on Gingerbread 及更好。它有一个非常有用的 API,对于开发网络客户端应用程序很有用。它改进了 Android 2.3 及更高版本上的响应缓存和压缩技术。这可以减少网络使用、提高速度并节省电池。
Apache
HTTPClient
has fewer bugs on Eclair and Froyo. It is the best choice for these releases.And according to the android team you should be using
HttpURLConnection
on Gingerbread and better.It has a pretty useful API that is just useful to develop a networking client application. It has improved response caching and improved compression technique on Android 2.3 and above. That reduces network use, improves speed and saves battery.
您可能正在寻找 AndroidHttpClient。
You may be looking for AndroidHttpClient.
我没有为 iOS 开发过,但是看看 NSURLRequest 的摘要,我想您可能会通过 URL 类来完成: http://developer.android.com/reference/java/net/URL.html
I've not developed for iOS but looking at the summary of NSURLRequest I think you'll probably get by with the URL class: http://developer.android.com/reference/java/net/URL.html