Non-http transport requested -set by msg.method

Hi i am new to node-red and trying to execute the http request by 'set by msg.method'
Now, I cannot find any resource to get my head around how to inject the string URL.

As of now, i have a function right before the http request node. Lets call the function A. In Function A date ranges are generated

and based on the dates i am creating a URL string with the format as followed.
msg.payload = "Token";
msg.headers = {
Authorization: "Bearer " + p.access_token
msg.url = "HTTP GET http://ip:port/API/x/x/x?FromDateUTC="+Date1+"&ToDateUTC="+Date2;

Function A returns msg

I was able to execute and get the required results when the http request node method was "GET".
But now because of the different date ranges i can not use the http request node method GET.

I don't really understand the title to your post, you want to use the http request node, but not use http?

In the text you ask about how to set the http method. If you look in the Info panel for the http request node it explains how to pass the http method (and which methods are supported)


msg.payload = "Token";
msg.headers = {Authorization: "Bearer " + p.access_token};
msg.url = "http://ip:port/API/x/x/x?FromDateUTC="+Date1+"&ToDateUTC="+Date2;
msg.method = "GET";
return msg

If you surround any code with ``` it makes it easier to read :slight_smile:

To check that your function is filling in the strings correctly feed it into a debug node set to Display Full Message and you will be able to see and check all the attributes.