# Non-http transport requested -set by msg.method

**URL:** <https://discourse.nodered.org/t/non-http-transport-requested-set-by-msg-method/12564>\
**Category:** General\
**Created:** [25 June 2019 01:08 UTC](https://discourse.nodered.org/t/non-http-transport-requested-set-by-msg-method/12564 "2019-06-25T01:08:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gjaan90](https://avatars.discourse-cdn.com/v4/letter/g/9d8465/32.png) [@gjaan90](https://discourse.nodered.org/u/gjaan90)\
**Post date:** [25 June 2019 01:08 UTC](https://discourse.nodered.org/t/non-http-transport-requested-set-by-msg-method/12564/1 "2019-06-25T01:08:19Z")

</div>

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  
Date1-Date2  
Date2-Date3  
Date3-Date4

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](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.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 June 2019 08:18 UTC](https://discourse.nodered.org/t/non-http-transport-requested-set-by-msg-method/12564/2 "2019-06-25T08:18:07Z")

</div>

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)

e.g

```auto
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 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 June 2019 09:56 UTC](https://discourse.nodered.org/t/non-http-transport-requested-set-by-msg-method/12564/3 "2019-06-25T09:56:10Z")

</div>

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.
