Problem using the post method (httposion)

I have a problem using the post method of
“httposion”, could help me?

This command worked perfectly
curl -X POST --data '{"name":"", "kind": "Native", "masters": [], "nameservers": ["", ""]}' -v -H 'X-API-Key: mykey' | jq .

But when I will use “httpoison”, it returns an error

  url = "" <> "/api/v1/servers/localhost"
  headers = [{"X-API-Key",  "mykey"}]
  body = {:multipart, [
    {"name", ""}, 
    {"kind", "Native"}, 
    {"masters", "[]"}, 
    {"nameservers", [{"", ""}]}
          }, body, headers)

Error generated:

** (FunctionClauseError) no function clause matching in anonymous fn/2 in :hackney_multipart.len_mp_stream/2

The following arguments were given to anonymous fn/2 in :hackney_multipart.len_mp_stream/2:

    # 1
    {"nameservers", [{"", ""}]}

    # 2

(hackney) /deps/hackney/src/hackney_multipart.erl:168: anonymous fn/2 in :hackney_multipart.len_mp_stream/2
(stdlib) lists.erl:1263: :lists.foldl/3
(hackney) /deps/hackney/src/hackney_multipart.erl:168: :hackney_multipart.len_mp_stream/2
(hackney) /deps/hackney/src/hackney_request.erl:323: :hackney_request.handle_body/4
(hackney) /deps/hackney/src/hackney_request.erl:83: :hackney_request.perform/2
(hackney) /deps/hackney/src/hackney.erl:376: :hackney.send_request/2
(httpoison) lib/httpoison/base.ex:796: HTTPoison.Base.request/6

How do I make it work?

Multipart takes a list of tuples, where both elements are binaries.

One the name of the part, the other the contents.

Also the requests aren’t equivalent.

The curl seems to send a single JSON payload, while the elixir code sends a multipart request with multiple payloads.