管理iPhone上的HTTP Cookie [英] Managing HTTP Cookies on iPhone

查看:202
本文介绍了管理iPhone上的HTTP Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要移植一个使用机械化iPhone的python应用程序。此应用程序需要登录到网页,并使用网站的Cookie去该网站上的其他网页获取一些数据。

I want to port a python app that uses mechanize for the iPhone. This app needs to login to a webpage and using the site cookie to go to other pages on that site to get some data.

使用我的python应用程序,我使用机械化自动cookie管理。是否有类似于Objective C的可移植到iPhone的东西?

With my python app I was using mechanize for automatic cookie management. Is there something similar for Objective C that is portable to the iPhone?

感谢任何帮助。

推荐答案

NSURLConnection 免费提供Cookie管理。从网址加载系统编程指南


网址载入系统会自动传送任何适用于NSURLRequest的储存Cookie。除非请求指定不发送cookie。同样,根据当前的Cookie接受政策,接受NSURLResponse中返回的Cookie。

The URL loading system automatically sends any stored cookies appropriate for an NSURLRequest. unless the request specifies not to send cookies. Likewise, cookies returned in an NSURLResponse are accepted in accordance with the current cookie acceptance policy.

这篇关于管理iPhone上的HTTP Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆