WebClient.UploadFileAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Http.dll (version 7.0.9313)
UploadFileAsync(String, String, Object)
Begins asynchronous UploadFile operation. Uploads a file to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadFileAsync(string uri, string filePath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | uri | Uri to send data to. |
| String | filePath | Path to a source file. |
| 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).
UploadFileAsync(Uri, String, Object)
Begins asynchronous UploadFile operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadFileAsync(Uri uri, string filePath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | uri | Uri to send data to. |
| String | filePath | Path to a source file. |
| 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).
UploadFileAsync(String, String, String, Object)
Begins asynchronous UploadFile operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadFileAsync(string uri, string method, string filePath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | uri | Uri to send data to. |
| String | method | HTTP method to use when sending the data. |
| String | filePath | Path to a source file. |
| 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).
UploadFileAsync(Uri, String, String, Object)
Begins asynchronous UploadFile operation. Uploads a data to provided URI and returns a response data of the upload operation.
Declaration
public Task<byte[]> UploadFileAsync(Uri uri, string method, string filePath, object state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | uri | Uri to send data to. |
| String | method | HTTP method to use when sending the data. |
| String | filePath | Path to a source file. |
| 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).