HTTP
The Http module enables http requests to be sent within a flow.
GET
Send a HTTP GET request. Returns a reply object containing;
statusthe http status-codedataa string containing the data receivedheadersan object containing the headers receivedtoDiskis a method to write the response data to disk
Parameters
urlthe url to GEToptsoptions, an object which may contain the following properties:credentials(optional) for basic-auth - an object containing;authset to"basic"for basic authusernameusername for the http resourcepasswordpassword for the http resource
headers(optional) an object defining headers to include in the requestuseragent(optional) a string overriding the default user agenttimeout(optional, default60000) ms to wait for the request to completecontenttype(optional) the requests content typeaccept(optional) an Accept headerhost(optional) the Host headeruseWebRequest(optional, defaultfalse) whether to use the .NET built-in http-clientuseWindowsAuth(optional, defaultfalse) use NTML authorization with current users credentialscookies(optional, defaultnull) an object containing cookies to send with the request
Example
// Anonymous
var reply = Http.get("http://somewhere/over/the/rainbow.txt", {});
if (reply.status == 200) { // Status: OK
...
}
// With basic-auth user/pass
Http.get("http://somewhere/over/the/rainbow.txt", { 'credentials': { 'auth': 'basic', 'username': 'John', 'password': 'ramb0' } });POST
Send a HTTP POST request. Returns a reply object containing;
statusthe http status-codedataa string containing the data received
Parameters
urlthe url to POST todataa string to POSToptsoptions, an object containing addition options for the request (see description in Http.get)
Example
// Anonymous
var reply = Http.post("http://somewhere/over/the/rainbow.txt", "data=123", {});
if (reply.status == 200) { // Status: OK
...
}To include some tasty cookies with your POST request:
var reply = Http.post("http://somewhere/over/the/rainbow.txt", "data=123", {
cookies: {
cookie1: "value1",
cookie2: "value2",
},
});PUT
Send a HTTP PUT request. Returns a reply object containing;
statusthe http status-codedataa string containing the data received
Parameters
urlthe url to PUT todataa string to PUToptsoptions, an object containing options for the request (see description in Http.get)
Example
// Anonymous
var reply = Http.put("http://somewhere/over/the/rainbow.txt", "data=123" {});
if (reply.status == 200) { // Status: OK
...
}DELETE
Send a HTTP DELETE request. Returns a reply object containing;
statusthe http status-codedataa string containing the data received
Parameters
urlthe url to DELETEoptsoptions, an object containing options for the request (see description in Http.get)
Example
// Anonymous
var reply = Http.delete("http://somewhere/over/the/rainbow.txt", {});
if (reply.status == 200) { // Status: OK
...
}Upload a file using a form post
Upload a file using a POST request. Returns a reply object containing:
statusthe http status codestatusDescriptiona string describing the status, or null if no errordataa string containing the dataheadersa list of headers returned from the post. In the form of key-value pairs, where the values are list of stringscookieslist of cookies returned from the posterrorMessagea message describing the error or null
The options argument can include:
multipart(bool) to indicate whether or not to do a multipart uploadtimeout(int) number of ms to wait for multipart upload to finishheaders(object) headers to apply to the request
Example with multi-part data (as from a html input form):
Http.upload("https://httpbin.org/post", "C:\\Users\\someone\\somefile.txt", {
multipart: true,
timeout: 10000,
headers: { accept: "application/json"}
} );This returned:
{
"status": 200,
"statusDescription": "OK",
"data": "",
"headers": {
"Connection": ["keep-alive"],
"Access-Control-Allow-Origin": ["*"],
"Access-Control-Allow-Credentials": ["true"],
"Date": ["Fri, 03 Oct 2025 13:24:41 GMT"],
"Server": ["gunicorn/19.9.0"]
},
"cookies": null,
"errorMessage": "OK"
}Please note that behavior would be a bit different if multipart is set to false. For instance the status would be 0 if there where no errors.
In case of an error it is returned in the ´reply´. For instance:
{
"status": 503,
"statusDescription": "Service Temporarily Unavailable",
"data": "",
"headers": {
"Connection": [
"keep-alive"
],
"Date": [
"Fri, 03 Oct 2025 13:08:14 GMT"
],
"Server": [
"awselb/2.0"
]
},
"cookies": null,
"errorMessage": "Service Temporarily Unavailable"
}Download a file and store it to disk
Download a remote file and store it to a local disk:
Http.get("http://save.my/file.txt").toDisk("C:\\here\\is\\my\\file.txt");