invokeUrl - send body with GET request

invokeUrl - send body with GET request

Hello,

I am trying to utilize the invokeUrl Deluge function to send a GET request with JSON request details in the body to my Node.js (Express) API. Request information is sent in the body because the request data can exceed URL parameter length and because the endpoint can accept a JSON array and loop through each object in the array. 

The invokeURL task documentation states that adding the "parameters" field to my invokeurl task will fill the body of my request. However, on the documentation, there are only examples of adding the parameters to a POST request. When using the methodology in my code snippet below, I can verify that the endpoint is successfully being reached but the body of the request is empty when viewing the request logs of the Node.js application.

From a NodeJS Express perspective, there is a difference between the "body" of a request and the "parameters" associated with a request:
req.params
"This property is an object containing properties mapped to the named route “parameters”. For example, if you have the route /user/:name, then the “name” property is available as req.params.name. This object defaults to {}."

req.body
"Contains key-value pairs of data submitted in the request body. By default, it is undefined, and is populated when you use body-parsing middleware such as body-parser and multer."

I am taking advantage of the "body-parser" middleware in the application. 


Because the invokeUrl makes use of the "parameters" parameter, I am unsure if req.body is actually being set. The Node.js service is logging the result of every incoming "req.body", but because it is running in production I can't make changes to test the logging of "req.params".

When replicating the request from Postman (content-type is application/json, the request is a GET request, and the request body is filled with identical JSON ), the body is successfully written. 

A snippet of my request is attached below for reference:

request_headers = Map();
request_headers.put("Authorization","<Authorization info>");
request_body = {
      "company":"test",
      "sku":"test",
      "quantity":"test",
      "customerNumber":"0001",
      "currencyCode": "USD"
};
response = invokeurl
[
url :"https://my-api-url.com/endpoint"
type :GET
parameters:request_body.toString()
headers:request_headers
content-type:"application/json"
];
info response;
 

For additional context, I can also reach the API endpoint using:
curl --location --request GET 'https://my-api-url.com/endpoint' \
--header 'Authorization: <Authorization info>' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "company""201",
        "sku""0216011050",
        "quantity""10",
        "customerNumber""0",
        "currencyCode"""
    },
    { 
        "company""201",
        "sku""116005500",
        "quantity""10000",
        "customerNumber""113805",
        "currencyCode"""
    }
]'
Any help understanding why the request's body is empty would be greatly appreciated!