iOS Guides | Samples

Foundation.NSUrlConnection Class

A Web Client.

See Also: NSUrlConnection

Syntax

[Foundation.Register("NSURLConnection", true)]
public class NSUrlConnection : NSObject, INSURLAuthenticationChallengeSender, IDisposable

Related content

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of Foundation.NSUrlConnection are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
CurrentRequestNSUrlRequest. The current connection request.
[read-only]
NewsstandAssetDownloadNKAssetDownload. Retrieves the NKAssetDownload of this newsstand-related connection.
[read-only]
OriginalRequestNSUrlRequest. A deep copy of the original connection request.

Public Methods

Cancel()
Cancels the asynchronous load of a request.
CancelAuthenticationChallenge(NSUrlAuthenticationChallenge)
Cancels the specified challenge.
static
CanHandleRequest(NSUrlRequest) : Boolean
Whether the specified request can be handled, based on a preflight evaluation.
ContinueWithoutCredential(NSUrlAuthenticationChallenge)
static
FromRequest(NSUrlRequest, INSUrlConnectionDelegate) : NSUrlConnection
PerformDefaultHandling(NSUrlAuthenticationChallenge)
RejectProtectionSpaceAndContinue(NSUrlAuthenticationChallenge)
Schedule(NSRunLoop, NSRunLoopMode)
Schedule(NSRunLoop, NSString)
Sets the run loop and mode this connection uses.
static
SendAsynchronousRequest(NSUrlRequest, NSOperationQueue, NSUrlConnectionDataResponse)
Loads the data and invokes a method upon completion.
static
SendRequestAsync(NSUrlRequest, NSOperationQueue) : System.Threading.Tasks.Task<NSUrlAsyncResult>
Loads the data and invokes a method upon completion.
static
SendSynchronousRequest(NSUrlRequest, out NSUrlResponse, out NSError) : NSData
SetDelegateQueue(NSOperationQueue)
Sets the operations queue to be used by this connection's delegate object.
Start()
Unschedule(NSRunLoop, NSRunLoopMode)
Unschedule(NSRunLoop, NSString)
Causes the connection to not use this run loop and mode.
UseCredential(NSUrlCredential, NSUrlAuthenticationChallenge)

Protected Methods

override
Dispose(Boolean)
Releases the resources used by the NSUrlConnection object.