美文网首页
获取cookies

获取cookies

作者: ElaineYin | 来源:发表于2019-08-07 13:46 被阅读0次
    //cookies获取
                NSHTTPCookieStorage *cookieJar = [NSHTTPCookieStorage sharedHTTPCookieStorage];
                NSArray *cookieArr = [cookieJar cookies];
                NSString *cookies = @"";
                for(NSHTTPCookie *cookie in cookieArr) {
                    NSLog(@"cookie -> %@", cookie);
                    // 获取cookie
                    if ([cookie.name isEqualToString:@"***"]) {
                        cookies = cookie.value;
                        break;
                    }
                }
    

    相关文章

      网友评论

          本文标题:获取cookies

          本文链接:https://www.haomeiwen.com/subject/fosodctx.html