.. only:: html
.. contents::
:local:
:depth: 1
Downloads a URL to the file system with an HTTP(S) GET or POST request.
| Label | Name | Type | Description |
|---|---|---|---|
| URL | URL |
[string] | The URL of the file to download. |
| File destination | OUTPUT |
[string] Default: |
Specification of the file destination. :ref:`One of <output_parameter_widget>`: |
| Label | Name | Type | Description |
|---|---|---|---|
| Method | METHOD |
[enumeration] Default: 0 |
The HTTP method to use for the request. Options are:
|
Data Optional |
DATA |
[string] | The data to add in the body if the request is a POST. |
| Label | Name | Type | Description |
|---|---|---|---|
| File destination | OUTPUT |
[string] | The location of the downloaded file |
Algorithm ID: native:filedownloader
Added in 3.40
Performs a HTTP(S) POST/GET request and returns the HTTP status code and the reply data. If an error occurs then the error code and the message will be returned. Optionally, the result can be written to a file on the disk. By default the algorithm will warn on errors. Optionally, the algorithm can be set to treat HTTP errors as failures.
| Label | Name | Type | Description |
|---|---|---|---|
| URL or file path | URL |
[string] | The URL or path of the file to open. |
| Method | METHOD |
[enumeration] Default: 0 |
The HTTP method to use for the request. Options are:
|
POST Data Optional |
DATA |
[string] | The data to add in the body if the request is a POST. |
Authentication Optional |
AUTH_CONFIG |
[authconfig] Default: No authentication |
An authentication configuration to pass |
| Consider HTTP errors as failures | FAIL_ON_ERROR |
[boolean] Default: False |
If set, the algorithm will fail on encountering an HTTP error. |
File destination Optional |
OUTPUT |
[string] Default: |
The result can be written to a file instead of being returned as a string. Specification of the file destination. :ref:`One of <output_parameter_widget>`: |
| Label | Name | Type | Description |
|---|---|---|---|
| File destination | OUTPUT |
[file] | The downloaded file with the returned result |
| HTTP Status | STATUS_CODE |
[string] | The HTTP Status |
| Network error code | ERROR_CODE |
[string] | The error code when it fails (like as well on 404 HTTP Status etc.) |
| Network error message | ERROR_MESSAGE |
[string] | A string containing the error message in case of failure |
| Result data | RESULT_DATA |
[string] | A string containing the result data in case of success |
Algorithm ID: native:httprequest
Opens files in their default associated application, or URLs in the user's default web browser.
| Label | Name | Type | Description |
|---|---|---|---|
| URL or file path | URL |
[string] | The URL or path of the file to open. |
The algorithm has no output.
Algorithm ID: native:openurl