Activity |
Http |
---|---|
Description |
Execute HTTP requests |
Input :
PropertyName |
Type |
Required |
Default Value |
Description |
---|---|---|---|---|
uri |
URL |
YES |
|
Target URI |
method |
STRING |
NO |
GET |
Http method (GET/POST/PUT/DELETE) |
jsonContent |
JSON |
NO |
|
Body of the request to send to the server (cannot be used with GET and DELETE method) This overrides contentFileToken. |
contentFileToken |
URL |
NO |
|
Should point to a file containing the body of the request to send to the server (cannot be used with GET and DELETE method) |
timeout |
INT |
NO |
60 |
HTTP request timeout in seconds |
failIfError |
BOOL |
NO |
TRUE |
Set the activity result as failed if the request returns a failed status.
|
outputHttpResponseJson |
NULLABLE BOOL |
NO |
|
|
httpHeaders |
DICTIONARY |
NO |
|
List of http headers to set for the request. |
httpQueryParams |
DICTIONARY |
NO |
|
List of query parameter to set for the request. |
outputFileName |
STRING |
NO |
|
Name of the file for the http response. If not specified, the file name will be retrieved from (in order)
|
outputFileStoreName |
STRING |
NO |
|
Name of the file store on which to save the http response. |
RequestContentType |
STRING |
NO |
|
Sets Content-Type HTTP header of request. Must be part of valid MIME types: https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types |
Output
PropertyName |
Type |
Optional |
Description |
---|---|---|---|
jsonContent |
JSON |
NO |
HTTP Response if content-type is “application/json”, and if OutputHttpResponseJson is either |
contentFileToken |
URL |
NO |
FileContent containing the body of the response (see outputFileName and outputFileStore input parameters) |
length |
INT |
NO |
HTTP Response Length in bytes |
StatusCode |
INT |
NO |
HTTP Response Status code ( https://developer.mozilla.org/fr/docs/Web/HTTP/Status ) |
reason |
STRING |
NO |
The reason phrase which typically is sent by servers together with the status code. |
httpHeaders |
DICTIONARY<STRING,STRING[]> |
NO |
Http headers of the response |
Example:
Download a file using HTTP
Input
{
"uri" : "https://sample.com/download/test.csv.gz",
"method" : "GET",
"outputFileStoreName" : "local",
"httpHeaders": {
"X-Custom-Header":"Sample value"
}
}
Output
{
"contentFileToken":"file://local/test.csv.gz",
"length": 45846468,
"statusCode": 200,
"httpHeaders": {
"Date": [
"Mon, 18 Jul 2022 10:09:14 GMT"
],
"Server": [
"gws"
],
"X-XSS-Protection": [
"0"
],
"X-Frame-Options": [
"SAMEORIGIN"
],
"Alt-Svc": [
"h3=\":443\"; ma=2592000",
"h3-29=\":443\"; ma=2592000",
"h3-Q050=\":443\"; ma=2592000",
"h3-Q046=\":443\"; ma=2592000",
"h3-Q043=\":443\"; ma=2592000",
"quic=\":443\"; ma=2592000"
]
}
}