HttpClient.DeleteAsync(Uri) HttpClient.DeleteAsync(Uri) HttpClient.DeleteAsync(Uri) HttpClient.DeleteAsync(Uri) HttpClient.DeleteAsync(Uri) Method

Definition

Send a DELETE request to the specified Uri as an asynchronous operation.

public : IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress> DeleteAsync(Uri uri)
IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress> DeleteAsync(Uri uri) const;
public IAsyncOperationWithProgress<HttpResponseMessage, HttpProgress> DeleteAsync(Uri uri)
Public Function DeleteAsync(uri As Uri) As IAsyncOperationWithProgress(Of HttpResponseMessageHttpProgress)
Windows.Web.Http.HttpClient.deleteAsync(uri).done( /* Your success and error handlers */ );

Parameters

uri
Uri Uri Uri

The Uri the request is sent to.

Returns

Remarks

This operation will not block. The returned IAsyncOperationWithProgress(HttpResponseMessage, HttpProgress) object will complete after the whole response (including content) is read.

Exception Handling

You must write code to handle exceptions when you call this method. Exceptions can result from parameter validation errors, name resolutions failures, and network errors. Exceptions from network errors (loss of connectivity, connection failures, and HTTP server failures, for example) can happen at any time. These errors result in exceptions being thrown. If not handled by your app, an exception can cause your entire app to be terminated by the runtime. For more information on how to handle exceptions, see Handling exceptions in network apps.

Below are the exceptions that this function throws.

E_INVALIDARG

The uri parameter was null reference (Nothing in Visual Basic).

See also