得到的溶液从苹果文献
NSURLCredential *凭证= [[NSURLCredential的alloc] initWithUser:@ “名为myUsername” 密码:@ “输入mypassword” 持久性:NSURLCredentialPersistenceForSession] ;
NSURLProtectionSpace *protectionSpace = [[NSURLProtectionSpace alloc]
initWithProxyHost:@"192.168.110.14" //proxy server
port:8080
type:NSURLProtectionSpaceHTTPProxy
realm:nil
authenticationMethod:NSURLAuthenticationMethodDefault];
[[NSURLCredentialStorage sharedCredentialStorage]
setDefaultCredential: credential
forProtectionSpace: protectionSpace];
[protectionSpace release];
[credential release];