Share via


NSUrlConnection.SendRequestAsync(NSUrlRequest, NSOperationQueue) Method

Definition

Loads the data and invokes a method upon completion.

[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static System.Threading.Tasks.Task<Foundation.NSUrlAsyncResult> SendRequestAsync(Foundation.NSUrlRequest request, Foundation.NSOperationQueue queue);
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member SendRequestAsync : Foundation.NSUrlRequest * Foundation.NSOperationQueue -> System.Threading.Tasks.Task<Foundation.NSUrlAsyncResult>

Parameters

request
NSUrlRequest

Request to perform

queue
NSOperationQueue

Operation queue to dispatch the completion to.

Returns

A task that represents the asynchronous SendAsynchronousRequest operation. The value of the TResult parameter is of type Action<Foundation.NSUrlAsyncResult>.

Attributes

Remarks

The SendRequestAsync method is suitable to be used with C# async by returning control to the caller with a Task representing the operation.

Applies to