# HTTPoison multipart post

**URL:** <https://forum.elixirforum.com/t/httpoison-multipart-post/49164>\
**Category:** Questions\
**Tags:** httpoison, multipart\
**Created:** [July 26, 2022, 6:21pm UTC](https://forum.elixirforum.com/t/httpoison-multipart-post/49164 "2022-07-26T18:21:03Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pramsky](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pramsky/32/16789_2.png) [@pramsky](https://forum.elixirforum.com/u/pramsky)\
**Post date:** [July 29, 2022, 3:58pm UTC](https://forum.elixirforum.com/t/httpoison-multipart-post/49164/7 "2022-07-29T15:58:13Z")

</div>

I was able to get the post text fields to show up in pipe dream as text by adding [“Content-Type”: “text/plain”] to the payload tuple.

It still does not work on the vendor site. I reached out to the vendor and he suggested it may be the boundary that is causing the issue. I have the logs of the POST request from the vendor.

The working request via Insomnia REST Client

```elixir
28/07 16.57.55.545 (2083 ms) 23.252.62.194 POST /api HTTP/1.1
content-type: [multipart/form-data; boundary=X-INSOMNIA-BOUNDARY]
accept: [*/*]
cookie: [sessionId=api_1.2.3.194_1659022119229_-1260159572]
authorization: [Bearer supersecretauthtoken]
host: [example.net]
content-length: [258197]
user-agent: [insomnia/2022.4.2]

file=/opt/stserver/tmp/foo.png&to=1234&from=15555555555&orgid=1234567890987564321

HTTP/1.1 200 OK
Date: [Thu, 28 Jul 2022 16:57:55]
Access-Control-Allow-Origin: [*]
Access-Control-Allow-Credentials: [true]
Server: [Smile CTI Server]
Set-Cookie: [sessionId=api_1.2.3.194_1659027473462_-1149585348]
Connection: [close]
Content-Type: [application/json; charset=UTF-8]
Content-Length: [59]

```

The non working HTTPoison request

```elixir
28/07 17.03.09.660 (578 ms)1.2.3.194 POST /api HTTP/1.1
content-type: [multipart/form-data; boundary=---------------------------nhzzivvxhvzlhrmf]
accept: [*/*]
authorization: [Bearer supersecretauthtoken]
host: [example.net]
content-length: [258478]
user-agent: [hackney/1.18.1]

HTTP/1.1 400 Bad Request
Date: [Thu, 28 Jul 2022 17:03:09]
Access-Control-Allow-Origin: [*]
Access-Control-Allow-Credentials: [true]
Server: [Smile CTI Server]
Connection: [close]
Content-Length: [0]

```

---

_[View the full topic](https://forum.elixirforum.com/t/httpoison-multipart-post/49164)._
