# Http Request not responding correctly

**URL:** <https://discourse.nodered.org/t/http-request-not-responding-correctly/38199>\
**Category:** General\
**Created:** [29 December 2020 11:44 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199 "2020-12-29T11:44:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oymyakon](https://avatars.discourse-cdn.com/v4/letter/o/ebca7d/32.png) [@Oymyakon](https://discourse.nodered.org/u/Oymyakon)\
**Post date:** [29 December 2020 11:44 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/1 "2020-12-29T11:44:32Z")

</div>

Hi, i am new to Node red but i am having trouble getting a HTTP request to work.  
I am trying to access the river level from the government web site. It looks like the response from the web page is being truncated.  
any help would be much appreciated.  
Cheers Paul.  
[  
{  
"id": "5659ece5.eed734",  
"type": "debug",  
"z": "23068b3d.514344",  
"name": "",  
"active": true,  
"tosidebar": true,  
"console": false,  
"tostatus": false,  
"complete": "true",  
"x": 590,  
"y": 160,  
"wires":   
},  
{  
"id": "999b1b3d.03ec08",  
"type": "inject",  
"z": "23068b3d.514344",  
"name": "",  
"props": [  
{  
"p": "payload",  
"v": "",  
"vt": "date"  
},  
{  
"p": "topic",  
"v": "",  
"vt": "string"  
}  
],  
"repeat": "",  
"crontab": "",  
"once": false,  
"onceDelay": 0.1,  
"topic": "",  
"payload": "",  
"payloadType": "date",  
"x": 120,  
"y": 160,  
"wires": [  
[  
"4bfd02f1.0d94dc"  
]  
]  
},  
{  
"id": "4bfd02f1.0d94dc",  
"type": "http request",  
"z": "23068b3d.514344",  
"name": "",  
"method": "GET",  
"ret": "txt",  
"paytoqs": "ignore",  
"url": "[https://flood-warning-information.service.gov.uk/station/7060](https://flood-warning-information.service.gov.uk/station/7060)",  
"tls": "",  
"persist": false,  
"proxy": "",  
"authType": "",  
"x": 330,  
"y": 160,  
"wires": [  
[  
"5659ece5.eed734"  
]  
]  
},  
{  
"id": "68559ee0.5231a",  
"type": "comment",  
"z": "23068b3d.514344",  
"name": "GET",  
"info": "",  
"x": 310,  
"y": 80,  
"wires":   
},  
{  
"id": "37e866f4.d20aaa",  
"type": "comment",  
"z": "23068b3d.514344",  
"name": "UTF-8",  
"info": "",  
"x": 310,  
"y": 120,  
"wires":   
}  
]

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 December 2020 11:48 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/2 "2020-12-29T11:48:32Z")

</div>

Hi @Oymyakon

> [@Oymyakon](#):
>
> It looks like the response from the web page is being truncated.

Why do you say that? What makes you think that?

PS, in order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [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:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 December 2020 14:06 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/3 "2020-12-29T14:06:10Z")

</div>

Only the debug output will be truncated. The actual values are not.

---

<div class="post-metadata">

**Author:** ![Oymyakon](https://avatars.discourse-cdn.com/v4/letter/o/ebca7d/32.png) [@Oymyakon](https://discourse.nodered.org/u/Oymyakon)\
**Post date:** [29 December 2020 18:34 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/4 "2020-12-29T18:34:39Z")

</div>

Thanks for all of your help.  
Cheers  
Paul.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [29 December 2020 20:31 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/5 "2020-12-29T20:31:10Z")

</div>

Hi Paul,

There is an example on the Node-red Cookbook section for the use of the **Http-request node** in combination with the **HTML node** in order to get information from an element on a website.

**[Simple GET request](https://cookbook.nodered.org/http/simple-get-request)**

In the Html node you can use **[CSS selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)** to pickup the information you need.

For your river level website its a little more tricky, since there is no direct unique class (.) or id (#) to select the desired element ... but have a go ... see what you get and if you have any difficulties let us know 😉

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd27942d224c0663182fe8e9b40644d69734802d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 February 2021 20:31 UTC](https://discourse.nodered.org/t/http-request-not-responding-correctly/38199/6 "2021-02-27T20:31:12Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
