# Add http start-line to tcp message

**URL:** <https://discourse.haproxy.org/t/add-http-start-line-to-tcp-message/9196>\
**Category:** Help!\
**Created:** [November 2, 2023, 1:01pm UTC](https://discourse.haproxy.org/t/add-http-start-line-to-tcp-message/9196 "2023-11-02T13:01:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamWalker](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@SamWalker](https://discourse.haproxy.org/u/SamWalker)\
**Post date:** [November 2, 2023, 1:01pm UTC](https://discourse.haproxy.org/t/add-http-start-line-to-tcp-message/9196/1 "2023-11-02T13:01:03Z")

</div>

Hello, thanks in advance for the help. Trying to figure out if this something haproxy can do.  
I’m sure it can, I just can’t figure out how.

1. receive a TCP connection on front end
2. read the first line
3. create an HTTP request with a body containing that first line from above.
4. forward this HTTP request to back end, which is an http server.
5. receive the http response (from the backend)
6. extract the body from the http response
7. return the extracted body to the TCP connection

for example  
incoming tcp request on frontend

```auto
hello, my name is Earl

```

converts to this HTTP request, and sends to backend

```auto
POST / HTTP/1.1
Host: localhost:8000
User-Agent: haproxy

hello, my name is Earl

```

response from http server

```auto
HTTP/1.1 200 Ok
Server: IIS
User-Agent: haproxy

hello Earl!

```

haproxy extracts the body and send it alone back over TCP connection

```auto
hello Earl!

```
