Interface NSURLConnectionDelegate
-
- All Known Subinterfaces:
NSURLConnectionDataDelegate,NSURLConnectionDownloadDelegate
public interface NSURLConnectionDelegate[@protocol] NSURLConnectionDelegate Delegate methods that are common to all forms of NSURLConnection. These are all optional. This protocol should be considered a base class for the NSURLConnectionDataDelegate and NSURLConnectionDownloadDelegate protocols. connection:didFailWithError: will be called at most once, if an error occurs during a resource load. No other callbacks will be made after.connectionShouldUseCredentialStorage: will be called at most once, before a resource load begins (which means it may be called during construction of the connection.) The delegate should return TRUE if the connection should consult the shared NSURLCredentialStorage in response to authentication challenges. Regardless of the result, the authentication challenge methods may still be called. connection:willSendRequestForAuthenticationChallenge: is the preferred (Mac OS X 10.7 and iOS 5.0 or later) mechanism for responding to authentication challenges. See
for more information on dealing with the various types of authentication challenges. connection:canAuthenticateAgainstProtectionSpace: connection:didReceiveAuthenticationChallenge: connection:didCancelAuthenticationChallenge: are deprecated and new code should adopt connection:willSendRequestForAuthenticationChallenge. The older delegates will still be called for compatibility, but incur more latency in dealing with the authentication challenge. API-Since: 2.0
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleanconnectionCanAuthenticateAgainstProtectionSpace(@NotNull NSURLConnection connection, @NotNull NSURLProtectionSpace protectionSpace)Deprecated.default voidconnectionDidCancelAuthenticationChallenge(@NotNull NSURLConnection connection, @NotNull NSURLAuthenticationChallenge challenge)Deprecated.default voidconnectionDidFailWithError(@NotNull NSURLConnection connection, @NotNull NSError error)default voidconnectionDidReceiveAuthenticationChallenge(@NotNull NSURLConnection connection, @NotNull NSURLAuthenticationChallenge challenge)Deprecated.default booleanconnectionShouldUseCredentialStorage(@NotNull NSURLConnection connection)default voidconnectionWillSendRequestForAuthenticationChallenge(@NotNull NSURLConnection connection, @NotNull NSURLAuthenticationChallenge challenge)
-
-
-
Method Detail
-
connectionCanAuthenticateAgainstProtectionSpace
@Deprecated default boolean connectionCanAuthenticateAgainstProtectionSpace(@NotNull @NotNull NSURLConnection connection, @NotNull @NotNull NSURLProtectionSpace protectionSpace)Deprecated.API-Since: 3.0 Deprecated-Since: 8.0 Deprecated-Message: Use -connection:willSendRequestForAuthenticationChallenge: instead.
-
connectionDidCancelAuthenticationChallenge
@Deprecated default void connectionDidCancelAuthenticationChallenge(@NotNull @NotNull NSURLConnection connection, @NotNull @NotNull NSURLAuthenticationChallenge challenge)Deprecated.API-Since: 2.0 Deprecated-Since: 8.0 Deprecated-Message: Use -connection:willSendRequestForAuthenticationChallenge: instead.
-
connectionDidFailWithError
default void connectionDidFailWithError(@NotNull @NotNull NSURLConnection connection, @NotNull @NotNull NSError error)
-
connectionDidReceiveAuthenticationChallenge
@Deprecated default void connectionDidReceiveAuthenticationChallenge(@NotNull @NotNull NSURLConnection connection, @NotNull @NotNull NSURLAuthenticationChallenge challenge)Deprecated.API-Since: 2.0 Deprecated-Since: 8.0 Deprecated-Message: Use -connection:willSendRequestForAuthenticationChallenge: instead.
-
connectionWillSendRequestForAuthenticationChallenge
default void connectionWillSendRequestForAuthenticationChallenge(@NotNull @NotNull NSURLConnection connection, @NotNull @NotNull NSURLAuthenticationChallenge challenge)
-
connectionShouldUseCredentialStorage
default boolean connectionShouldUseCredentialStorage(@NotNull @NotNull NSURLConnection connection)
-
-