# Using HTTP Request to pull data from FANUC Web Sever

**URL:** <https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095>\
**Category:** Industrial\
**Tags:** http-request, mqtt\
**Created:** [26 July 2023 18:58 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095 "2023-07-26T18:58:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gettmad](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@gettmad](https://discourse.nodered.org/u/gettmad)\
**Post date:** [26 July 2023 18:58 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095/1 "2023-07-26T18:58:32Z")

</div>

I have been attempting to make an HTTP Request to a FANUC Robots webserver such that I can pull the applicable data from the web server and upload it to MQTT.

When making the GET HTTP Request from Postman the applicable data is retrieved however when making the Request from the HTTP Request Node in Node-RED I cannot seem to get the same result. I have quadruple checked all applicable headers and ensured the URL is set correctly.

When invoking a curl _myurl_ -I command from the command window in order to retrieve the headers I receive a 'HTTP/1.0 503 Service Unavailable error' which makes me believe the Server is busy and/or does not allow this capability. Although, Postman makes the request without error.

When attempting to make the request in Node-RED with the same Headers set in Postman I receive the following error message: "Request Error: Parse Error: Invalid header value char : _myurl_" additionally below the HTTP Request Node it reads "HPE\_INVALID\_HEADER\_TOKEN". I have attempted to encode the URL using encodeURIComponent(_myurl_) however it gives me "TypeError: Invalid URL".

If anyone could give any insight or suggestions on this matter it would be greatly appreciated.

---

<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:** [26 July 2023 21:22 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095/2 "2023-07-26T21:22:19Z")

</div>

> [@gettmad](#):
>
> HPE\_INVALID\_HEADER\_TOKEN

Mentioned many times on the forum.

In short, your old robots are returning malformed response (According to the http spec)

Luckily, this is _handled_ in latest Node-RED beta - you get an option to disable strict parsing that really [REALLY](https://github.com/node-red/node-red/issues/4217#issuecomment-1585672234) works

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

If you are in a position to test this and feedback, we would be most appreciative.

---

<div class="post-metadata">

**Author:** ![gettmad](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@gettmad](https://discourse.nodered.org/u/gettmad)\
**Post date:** [27 July 2023 12:01 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095/3 "2023-07-27T12:01:28Z")

</div>

Hello Steve,

Thank you for the quick response. The fix does indeed work in the the latest Node-RED beta v3.1.0-beta.4.

When checking off "Disable strict HTTP parsing" I was able to retrieve my desired data.

_To note: I am running Node.js version: v18.16.0_

---

<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:** [27 July 2023 13:08 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095/4 "2023-07-27T13:08:17Z")

</div>

Thanks for the feedback. Adds confidence to imminent v3.1 release.

---

<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:** [10 August 2023 13:09 UTC](https://discourse.nodered.org/t/using-http-request-to-pull-data-from-fanuc-web-sever/80095/5 "2023-08-10T13:09:11Z")

</div>

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