objective c - ASIHTTPRequest setDomain -> NSURLRequest equivalent? -
I'm trying to rely heavily infection at some old code to SOAP requests that Does anybody know that there is a equivalent function? I tried to set it as a header named "domain", but it did not seem to work. Finished after some advice from ASIHTTPRequest
library rather than the standard NSMutableURLRequest
use However, I am having an issue with, while ASIHTTPRequest
I had access to a setDomain
function, I can not seem to find an equivalent with NSMutableURLRequest
.
:
Opting out, you domain There is no need to set up independently; You can set it by passing it as a part of the username such as: domain \\ user name
was ended using the exact code within an NSURLCredentials object:
takes care of // HTTP authentication - (void) connection: (NSURLConnection *) connection didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge *) challenge {NSString * authMethod = [[challenge security space] authentication method]; If ([authMethod isEqualToString: NSURLAuthenticationMethodNTLM]) {NSURLCredential * credentials = [NSURLCredential credentialWithUser: [NSString stringWithFormat: @ "domain \\% @", self.userName] Password: self.password persistence: NSURLCredentialPersistenceForSession]; [[Challenge Sender] Username: Credential for Attribution Challenge: Challenge]; }}
Assuming this is a NSURLConnectionDeligate
, of course.
Comments
Post a Comment