# Incomprehensible load from the TCP IN node - Solved

**URL:** <https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061>\
**Category:** General\
**Tags:** http-request\
**Created:** [3 November 2022 19:25 UTC](https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061 "2022-11-03T19:25:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yury](https://avatars.discourse-cdn.com/v4/letter/y/f19dbf/32.png) [@Yury](https://discourse.nodered.org/u/Yury)\
**Post date:** [3 November 2022 19:25 UTC](https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061/1 "2022-11-03T19:25:21Z")

</div>

Good evening everyone.  
Using the TCPin node, I created a Web-server for a device that is a Web-client.  
The Web-server listens on port 50001.  
The Web-client documentation says that it should send a request like:

```auto
{
    "type":"Z5R",
    "messages":
        [{
            "id":1234567890,
            "operation":"power_on"
        }]
}

```

and the Web-server should respond to it:

```auto
{
    "date":"2022-11-02 12:00:00",
    " messages":
        [{
            "id":0123456789,
            "operation":"set_active"
        ]}
}

```

But something else comes to TCPin:

```auto
{
    "payload": "POST / HTTP/1.1\r\nHost: 192.168.11.123:50001\r\nAccept: */*\r\nUser-Agent: Z5R WEB\r\nConection: close\r\nContent-type: application/json\r\nContent-Length: 197\r\n\r\n{\"type\":\"Z5R\",\"messages\":[{\"id\":1681692777,\"operation\":\"power_on\"}]}",
    "ip": "::ffff:192.168.11.134",
    "port": 59708,
    "_session": {
        "type": "tcp",
        "id": "fb857367.081b8"
    },
    "_msgid": "ecae1f3.13a8fe"
}

```

And now the questions:

1. Why does such content come - is it the wrong behavior of the Web-client?
2. What kind of load should the Web-server send with such a request?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [3 November 2022 21:35 UTC](https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061/2 "2022-11-03T21:35:57Z")

</div>

> Using the TCPin node, I created a Web-server

I am a bit puzzled. The tcp nodes are for tcp connections, the http nodes are for http connections  
You are receiving http input, why not using http-in + http response nodes to create a webserver ?

---

<div class="post-metadata">

**Author:** ![Yury](https://avatars.discourse-cdn.com/v4/letter/y/f19dbf/32.png) [@Yury](https://discourse.nodered.org/u/Yury)\
**Post date:** [3 November 2022 22:15 UTC](https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061/3 "2022-11-03T22:15:47Z")

</div>

Thank you so much for noticing my mistake, which I haven't seen for 2 days of failures !  
I changed node "TCP In" to "HTTP In" and everything worked !

---

<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 November 2022 22:15 UTC](https://discourse.nodered.org/t/incomprehensible-load-from-the-tcp-in-node-solved/70061/4 "2022-11-17T22:15:57Z")

</div>

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