Expand description
Read and write data through http(s) connector.
§Configuration
key | alias | Description | Default Value | Possible Values |
---|---|---|---|---|
type | - | Required in order to use this connector. | curl | curl |
metadata | meta | Override metadata information. | null | crate::Metadata |
authenticator | auth | Define the authentification that secure the http(s) call. | null | crate::connector::authenticator::basic::Basic / crate::connector::authenticator::bearer::Bearer / crate::connector::authenticator::jwt::Jwt |
endpoint | - | The http endpoint of the url like http://my_site.com:80. | null | String |
path | uri | The path of the resource. | null | String |
method | - | The http method to use. | get | HTTP methods |
headers | - | The http headers to override. | null | List of key/value |
timeout | - | Time in secound before to abort the call. | 5 | Unsigned number |
keepalive | - | Enable the TCP keepalive. | true | true / false |
tcp_nodelay | - | Enable the TCP nodelay. | false | true / false |
parameters | - | Parameters used in the path that can be override. | null | Object or Array of objects |
paginator_type | paginator | Paginator parameters. | crate::connector::paginator::curl::offset::Offset | crate::connector::paginator::curl::offset::Offset / crate::connector::paginator::curl::cursor::Cursor |
counter_type | count / counter | Use to find the total of elements in the resource. | null | crate::connector::counter::curl::header::Header / crate::connector::counter::curl::body::Body |
cache_mode | cache | Enable the backend cache management and define the cache strategy. See the details here https://github.com/06chaynes/http-cache/blob/main/http-cache/src/lib.rs#L265-L295 | null | default / no_store / reload / no_cache / force_cache / if_cached / ignore_rules |
redirection_limit | - | Limit of redirection | 5 | Integer |
§Examples
[
{
"type": "read",
"connector":{
"type": "curl",
"endpoint": "{{ CURL_ENDPOINT }}",
"path": "/get?skip={{ paginator.skip }}&limit={{ paginator.limit }}&cache={{ cache }}",
"method": "get",
"authenticator": {
"type": "basic",
"username": "{{ BASIC_USERNAME }}",
"password": "{{ BASIC_PASSWORD }}",
},
"headers": {
"Accept": "application/json"
},
"parameters": [
{ "cache": false }
],
"paginator": {
"limit": 100,
"skip": 0
},
"cache_mode": "default"
}
}
]