質問

私はNSURLConnectionとHTTPSに興味があります。それは、リクエストを送信チャレンジに応答して、安全なURLをロードすることはできますか?

HTTPS経由NSURLConnectionで行うことができる何か他のものがありますか?

役に立ちましたか?

解決

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://monsite/mapage.php"]
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:60.0];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[[NSString stringWithFormat:@"score=222"] dataUsingEncoding:NSUTF8StringEncoding]];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];

and then implement the appropiate delegate methods for NSURLConnection.

他のヒント

NSUrlConnection works out of the box with HTTPS. You do not have to do anything special.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top