iphone nsurlconnection read cookies

前端 未结 3 1734
情书的邮戳
情书的邮戳 2021-01-02 02:00

I am using async NSURLConnection to connect to a web site from iPhone. Handle didReceiveResponse is activated on response and I am trying to get all cookies, by using allHea

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 02:39

    Try this: in your NSMutableURLRequest, you should tell it to handle cookies:

    [request setHTTPShouldHandleCookies:YES];
    

提交回复
热议问题