Create a cookie for NSURLRequest?

后端 未结 5 1640
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 22:05

I\'m trying to send an authentication string via cookie in a NSMutableURLRequest. I\'m trying to create the NSHTTPCookie through

 +(id)cookieWithProperties:(         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 22:56

    key NSHTTPCookiePath should exist in dictionary when using

    [NSHTTPCookie cookieWithProperties:dictionary]
    

    method whether using NSHTTPCookieDomain or NSHTTPCookieOriginURL. And value for NSHTTPCookiePath should be @"/" not @"\\".

提交回复
热议问题