Http Request not responding correctly

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",
"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":
}
]

Hi @Oymyakon

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

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

Thanks for all of your help.
Cheers
Paul.

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

In the Html node you can use 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 :wink:

1 Like

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