# Payload length limitation, base64

**URL:** <https://discourse.nodered.org/t/payload-length-limitation-base64/60091>\
**Category:** General\
**Tags:** http-request\
**Created:** [19 March 2022 22:12 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091 "2022-03-19T22:12:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damorck](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damorck/32/20596_2.png) [@Damorck](https://discourse.nodered.org/u/Damorck)\
**Post date:** [19 March 2022 22:12 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/1 "2022-03-19T22:12:25Z")

</div>

Hi all

My Node-RED setup contains a GET request from an OpenAPI service, that returns a base64 string. The returned base64 string doesn´t return the complete string (compared with same request in Postman), ending with "...". Is there a limit for the length of the string in Node-RED - and is there a workaround I can read on?

Thanks.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [19 March 2022 22:25 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/2 "2022-03-19T22:25:55Z")

</div>

There is limit to what will be displayed in the debug sidebar, but the `msg` object will contain the full response.

The limit is mainly for performance reasons as it need to to be streamed from the backend to the editor over Websockets.

You have 2 choices

1. Set the debug node to output to the console as well as the sidebar, this output will always contain the full message.
2. You can change the limit in the `settings.js` but to be honest I really wouldn't change this. You would change the `debugMaxLength: 1000` value and restart node-red.

---

<div class="post-metadata">

**Author:** ![Damorck](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damorck/32/20596_2.png) [@Damorck](https://discourse.nodered.org/u/Damorck)\
**Post date:** [20 March 2022 06:55 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/3 "2022-03-20T06:55:41Z")

</div>

@hardillb, spot on. It works. Thank´s for the help. A question. Should I be worried, when setting the `debugMaxLength` to around 100000? I know that it will occur in my setup.

---

<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:** [20 March 2022 07:42 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/4 "2022-03-20T07:42:49Z")

</div>

There should be no need to set it it is ONLY for debug for you to look at. Are you really going to be visually inspecting them by eye ? The actual messages in the flow on the server are not affected.

---

<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:** [20 March 2022 07:49 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/5 "2022-03-20T07:49:06Z")

</div>

I don't recommend doing this. You will slow down node-red and your browser as it attempts to (pointlessly) send & render 100000 characters that you have no hope of inspecting.

If you have a need to occasionally inspect the full payload of a 100000 characters, I suggest you either send it to file or the console.

---

<div class="post-metadata">

**Author:** ![Damorck](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damorck/32/20596_2.png) [@Damorck](https://discourse.nodered.org/u/Damorck)\
**Post date:** [20 March 2022 08:00 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/6 "2022-03-20T08:00:44Z")

</div>

I´m parsing the payload, so therefore the reason. I might be missing something here from @hardillb - as in using the console :

> [@hardillb](#):
>
> Set the debug node to output to the console as well as the sidebar, this output will always contain the full message.

The console, I rarely work with - I´m strictly working in the GUI. I just want to parse the full response for a insert into database with postgrestor node.

---

<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:** [20 March 2022 08:03 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/7 "2022-03-20T08:03:27Z")

</div>

The whole message gets passed to the next node. It’s only the debug visualisation that is truncated. The parser will get it all no matter how you set that value. After all you don’t need to have the debug there for it to work.

---

<div class="post-metadata">

**Author:** ![Damorck](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damorck/32/20596_2.png) [@Damorck](https://discourse.nodered.org/u/Damorck)\
**Post date:** [20 March 2022 08:12 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/8 "2022-03-20T08:12:32Z")

</div>

That makes sense. Thanks for the info.

---

<div class="post-metadata">

**Author:** ![Damorck](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damorck/32/20596_2.png) [@Damorck](https://discourse.nodered.org/u/Damorck)\
**Post date:** [20 March 2022 08:13 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/9 "2022-03-20T08:13:07Z")

</div>

Noted. Thx.

---

<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:** [3 April 2022 08:14 UTC](https://discourse.nodered.org/t/payload-length-limitation-base64/60091/10 "2022-04-03T08:14:08Z")

</div>

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