WebClient.UploadDataAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Http.dll (version 7.0.9119)
UploadDataAsync(String, Byte[], Object)
Begins asynchronous UploadData operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadDataAsync(string uri, byte[] data, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | uri | Uri to send data to. |
Byte[] | data | Data to send to provided URI. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Response data of the upload operation. |
Remarks
HTTP method POST is used.
UploadDataAsync(Uri, Byte[], Object)
Begins asynchronous UploadData operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadDataAsync(Uri uri, byte[] data, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to send data to. |
Byte[] | data | Data to send to provided URI. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Response data of the upload operation. |
Remarks
HTTP method POST is used.
UploadDataAsync(String, String, Byte[], Object)
Begins asynchronous UploadData operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadDataAsync(string uri, string method, byte[] data, object state = null)
Parameters
Type | Name | Description |
---|---|---|
String | uri | Uri to send data to. |
String | method | HTTP method to use when sending the data. |
Byte[] | data | Data to send to provided URI. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Response data of the upload operation. |
Remarks
HTTP method POST is used when method is set to null (Nothing in VB).
UploadDataAsync(Uri, String, Byte[], Object)
Begins asynchronous UploadData operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadDataAsync(Uri uri, string method, byte[] data, object state = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to send data to. |
String | method | HTTP method to use when sending the data. |
Byte[] | data | Data to send to provided URI. |
Object | state | An optional user-provided object that identifies this particular asynchronous operation. |
Returns
Type | Description |
---|---|
Task<Byte[]> | Response data of the upload operation. |
Remarks
HTTP method POST is used when method is set to null (Nothing in VB).