# Txt file and Http request

**URL:** <https://discourse.nodered.org/t/txt-file-and-http-request/30311>\
**Category:** General\
**Created:** [18 July 2020 23:33 UTC](https://discourse.nodered.org/t/txt-file-and-http-request/30311 "2020-07-18T23:33:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaMtz](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@JoshuaMtz](https://discourse.nodered.org/u/JoshuaMtz)\
**Post date:** [18 July 2020 23:33 UTC](https://discourse.nodered.org/t/txt-file-and-http-request/30311/1 "2020-07-18T23:33:06Z")

</div>

I am trying to upload a .txt file to an http address. The problem is that the information is published on a single line, that is: The .txt file contains the following numbers:  
0 10  
1 10  
2 10  
3 10  
4 10  
But when checking the http address, it is displayed as:  
0 10 1 10 2 10 3 10 4 10  
I attach a photo of the nodes that I am using. I

 ![Nodos](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/528d7d788d104e3a052d71354c3bf1ad7471e6ce.png) hope someone can help me to solve this problem.

---

<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:** [19 July 2020 11:12 UTC](https://discourse.nodered.org/t/txt-file-and-http-request/30311/2 "2020-07-19T11:12:14Z")

</div>

without seeing the actual binary of the data transferred it's hard to tell if there is really a problem. It may just be the way it is displayed.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 July 2020 11:30 UTC](https://discourse.nodered.org/t/txt-file-and-http-request/30311/3 "2020-07-19T11:30:22Z")

</div>

What http headers are you setting in the flow?

If you set `content-type` to `text/plain` it'll tell the browser to display it as-is and not try to treat it like html (which ignores whitespace like newlines)

---

<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:** [17 September 2020 11:30 UTC](https://discourse.nodered.org/t/txt-file-and-http-request/30311/4 "2020-09-17T11:30:29Z")

</div>

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