# HTTP Request response changed 0.20.2 upgrade

**URL:** <https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269>\
**Category:** General\
**Created:** [21 March 2019 10:04 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269 "2019-03-21T10:04:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [21 March 2019 10:04 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/1 "2019-03-21T10:04:59Z")

</div>

Hi All,  
I have just gone from NR 0.18.2 to 0.20.2 on my Home automation test bed running on a RPI.  
The http link to my Daikin ducted AC stopped working. Really simple \> Inject to HTTP Request and debug node. This has been working now for weeks. At first I checked out the Daikin wifi unit suspecting it had fallen over. I then pasted the url directly into a web browser and the correct response was returned which I have been getting from the HTTP Request till now.

ret=OK,sta=2,cur=2019/3/21 20:19:58,reg=au,dst=1,zone=345

From the debug node after the upgrade I get.

\_msgid: "133c03c7.51762c"  
topic: ""  
payload: ""  
statusCode: 403  
headers: object  
responseUrl: "[http://192.168.1.22:80/skyfi/common/get\_datetime](http://192.168.1.22:80/skyfi/common/get_datetime)"  
redirectList: array[0]

During the upgrade I also upgraded the general OS apt-get update and upgrade just to bring the system upto date.

Code is below.

[{"id":"ac98d615.493908","type":"debug","z":"ba04ec5b.44317","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":260,"wires":},{"id":"8e5ce68f.844258","type":"inject","z":"ba04ec5b.44317","name":"","topic":"","payload":"[http://192.168.1.22/skyfi/common/get\_datetime","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["c791b449.64f9c8"]]},{"id":"c791b449.64f9c8","type":"http](http://192.168.1.22/skyfi/common/get_datetime%22,%22payloadType%22:%22str%22,%22repeat%22:%22%22,%22crontab%22:%22%22,%22once%22:false,%22onceDelay%22:0.1,%22x%22:130,%22y%22:260,%22wires%22:%5B%5B%22c791b449.64f9c8%22%5D%5D%7D,%7B%22id%22:%22c791b449.64f9c8%22,%22type%22:%22http) request","z":"ba04ec5b.44317","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"[http://192.168.1.22:80/skyfi/common/get\_datetime","tls":"","proxy":"","x":370,"y":260,"wires":[["ac98d615.493908](http://192.168.1.22:80/skyfi/common/get_datetime%22,%22tls%22:%22%22,%22proxy%22:%22%22,%22x%22:370,%22y%22:260,%22wires%22:%5B%5B%22ac98d615.493908)"]]}]

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [21 March 2019 10:30 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/2 "2019-03-21T10:30:31Z")

</div>

Please edit your post above and format your code correctly, otherwise it will be difficult to help. See [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 March 2019 11:03 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/3 "2019-03-21T11:03:05Z")

</div>

> [@nosaj66au](#):
>
> statusCode: 403

is forbidden from the server end... do you have the correct user/pwd - credentials in place.

---

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [21 March 2019 21:46 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/4 "2019-03-21T21:46:45Z")

</div>

Sorry about that not sure what happend @Paul-Reed

```auto
[{"id":"ac98d615.493908","type":"debug","z":"ba04ec5b.44317","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":260,"wires":[]},{"id":"8e5ce68f.844258","type":"inject","z":"ba04ec5b.44317","name":"","topic":"","payload":"http://192.168.1.22/skyfi/common/get_datetime","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":260,"wires":[["c791b449.64f9c8"]]},{"id":"c791b449.64f9c8","type":"http request","z":"ba04ec5b.44317","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.1.22:80/skyfi/common/get_datetime","tls":"","proxy":"","x":370,"y":260,"wires":[["ac98d615.493908"]]}]

```

@dceejay No security on the device at all. What has me stumped the URL work fine in every browser I have tried even on the same machine. It is like the is a different in the message structure a browser uses and HTTP request uses.

---

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [22 March 2019 00:32 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/5 "2019-03-22T00:32:29Z")

</div>

This is a Wireshark trace of the Browser Request which returns correctly

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/140727367063378e22f599fbf24bcdf051582fc5.png)

This is the Node Red Request which fails

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e0d0f66042db69068ac90114153f2f252af3fbc9.png)

Not sure how to add the addition browser properties to the HTTP Request to get it working. I will then remove them one by one to find the offender. BTW this test was done a entirely different VM machine with NR 0.19.5 so it not a 0.20.2 version issue. Keep in mind this did work on 0.18.2

---

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [22 March 2019 01:20 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/6 "2019-03-22T01:20:11Z")

</div>

Ok, Worked out how to make the request function look identical to the Browser request. But no luck the Http request is still return 403.  
Just tried from the terminal  
"curl [http://192.168.1.22/skyfi/common/get\_datetime](http://192.168.1.22/skyfi/common/get_datetime)" all good responded correctly.  
Any ideas.

---

<div class="post-metadata">

**Author:** ![nosaj66au](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nosaj66au/32/5171_2.png) [@nosaj66au](https://discourse.nodered.org/u/nosaj66au)\
**Post date:** [22 March 2019 03:44 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/7 "2019-03-22T03:44:14Z")

</div>

OK most likely my last post on this topic, unless someone has any better ideas. Ran Curl from the exec node and it return the correct string.

---

<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:** [22 March 2019 07:31 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/8 "2019-03-22T07:31:34Z")

</div>

For others finding this thread the cookbook includes an example of how to add http headers

[https://cookbook.nodered.org](https://cookbook.nodered.org)

---

<div class="post-metadata">

**Author:** ![leka2105](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leka2105](https://discourse.nodered.org/u/leka2105)\
**Post date:** [3 July 2020 19:58 UTC](https://discourse.nodered.org/t/http-request-response-changed-0-20-2-upgrade/9269/9 "2020-07-03T19:58:35Z")

</div>

I'm also an owner of a Daikin AC and I also use Node Red for Smarthome. And Surprise I was struggling at the same point - but i found a solution.  
You must set the http-header "Host" to the IP Address of your Daikin Controller:  
I fixed it with following lines in a function Node:

```auto
msg.headers = {};
msg.headers['Host'] = "10.0.0.**"; // IP of my Daikin

```
