You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
Response:
{ status code: 401, headers {
"Cache-Control" = private;
"Content-Language" = en;
"Content-Length" = 951;
"Content-Type" = "text/html;charset=utf-8";
Date = "Tue, 29 May 2018 07:32:43 GMT";
Expires = "Thu, 01 Jan 1970 08:00:00 CST";
Server = "Apache-Coyote/1.1";
"Www-Authenticate" = "Digest realm="My Realm", qop="auth", nonce="1527579163026:3643c85f69be9ac55a4a42d87fe69dab", opaque="A09625523209ADC9E967098F1F0C1491"";
} }
After above response, I can't print next Request content, include ‘Authenticate’!
This is deal Challenge code:
[self.sessionManager setSessionDidReceiveAuthenticationChallengeBlock:^NSURLSessionAuthChallengeDisposition(NSURLSession * _Nonnull session, NSURLAuthenticationChallenge * _Nonnull challenge, NSURLCredential *__autoreleasing _Nullable * _Nullable credential) {
*credential = [[NSURLCredential alloc] initWithUser:@"tomcat" password:@"tomcat" persistence:NSURLCredentialPersistenceForSession];
return NSURLSessionAuthChallengeUseCredential;
}];
[self.sessionManager setTaskDidReceiveAuthenticationChallengeBlock:^NSURLSessionAuthChallengeDisposition(NSURLSession * _Nonnull session, NSURLSessionTask * _Nonnull task, NSURLAuthenticationChallenge * _Nonnull challenge, NSURLCredential *__autoreleasing _Nullable * _Nullable credential) {
*credential = [[NSURLCredential alloc] initWithUser:@"tomcat" password:@"tomcat" persistence:NSURLCredentialPersistenceForSession];
return NSURLSessionAuthChallengeUseCredential;
}];
The text was updated successfully, but these errors were encountered: