标签:Nid turn ios har ISE tor red val name
获取session的方法:
#pragma mark - 获取session
-(NSString *)getsession{
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray *cookies = [cookieStorage cookiesForURL:[NSURL URLWithString:接口名]];
NSString *sessionId;
for (NSHTTPCookie *cookie in cookies) {
if ([cookie.name isEqualToString:@"PHPSESSID"]) {
NSDictionary *properties = cookie.properties;
sessionId = properties[@"Value"];
break;
}
}
return sessionId;
}
获取sessionID之后传给后台请求其他接口
标签:Nid turn ios har ISE tor red val name
原文地址:https://www.cnblogs.com/duzhaoquan/p/8981523.html