# Hpe\_invalid\_constant

**URL:** <https://discourse.nodered.org/t/hpe-invalid-constant/4385>\
**Category:** General\
**Created:** [29 October 2018 12:40 UTC](https://discourse.nodered.org/t/hpe-invalid-constant/4385 "2018-10-29T12:40:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AD3D](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ad3d/32/2731_2.png) [@AD3D](https://discourse.nodered.org/u/AD3D)\
**Post date:** [29 October 2018 12:40 UTC](https://discourse.nodered.org/t/hpe-invalid-constant/4385/1 "2018-10-29T12:40:17Z")

</div>

After searching this forum and Google, I didn't find what I was looking for. So I now following the advice to start a new topic for this (at least for me) unknown error.  
The problem is coming/part off/generated (perhaps by me) from an http request node.  
To explain it more: I have a device with a webpage. ![image1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/21d7823735501c65e9ca729c3f8090d824213528.jpeg)  
It has two switches: sw\_0 and sw\_1.  
If in the browser I type: ![image2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d7a7e0dff1eca5367de8c95619faf0c2f617d62b.jpeg) I can put sw\_1 on.  
Or: ![image2a](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f7d8176554a30d81c7f5acffead1e41a43f49a0a.jpeg) to put sw\_1 off.  
So far so good but when I now try to get info from this page with a http request node, I get this error, HPE\_INVALID\_CONSTANT under the node and in the debug window it shows "Error: Parse Error".  
I guess I am doing something completely wrong.

> [{"id":"8da0b852.8c87e8","type":"inject","z":"7b226f34.d363","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":140,"wires":[["714af8ec.a24cd"]]},{"id":"1995a2a9.f4a055","type":"debug","z":"7b226f34.d363","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":140,"wires":},{"id":"714af8ec.a24cd","type":"http request","z":"7b226f34.d363","name":"","method":"POST","ret":"txt","url":"[http://192.168.2.200/sw\_on=0","tls":"","x":350,"y":140,"wires":[["1995a2a9.f4a055](http://192.168.2.200/sw_on=0%22,%22tls%22:%22%22,%22x%22:350,%22y%22:140,%22wires%22:%5B%5B%221995a2a9.f4a055)"]]}]

I did this ones before with a webpage that showed some values of temperature and humidity but that seems not to work with this one.  
Any ideas how to solve this? Thanks for reading.

---

<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:** [29 October 2018 12:50 UTC](https://discourse.nodered.org/t/hpe-invalid-constant/4385/2 "2018-10-29T12:50:11Z")

</div>

Generally that means there is an issue with the html being returned by the website.  
When you look at the page with a browser, what page is returned. Does the browser console indicate any errors?

---

<div class="post-metadata">

**Author:** ![hugobox](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hugobox/32/2948_2.png) [@hugobox](https://discourse.nodered.org/u/hugobox)\
**Post date:** [15 October 2024 14:18 UTC](https://discourse.nodered.org/t/hpe-invalid-constant/4385/4 "2024-10-15T14:18:27Z")

</div>

I know this is an old thread, but stumbled on the same problem and found a workaround. Replace the http request node with an exec node with a command: curl --http0.9 [http://yourwebpage](http://yourwebpage)
