Skip to content

Commit 298d329

Browse files
authored
Merge pull request neilberkman#17 from blockfi/jcomellas/convert-structs-to-maps-when-adding-to-request
Convert single structs to maps when adding them to the request
2 parents f7e71f1 + 93c0a69 commit 298d329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docusign/request_builder.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ defmodule DocuSign.RequestBuilder do
6060
%{^key => :body} when map_size(definitions) == 1 ->
6161
# If there is a single entity to send in the body there is no need to
6262
# enclose it in a multipart request.
63-
add_param(request, :body, :body, Poison.encode!(value))
63+
add_param(request, :body, :body, Map.from_struct(value))
6464

6565
_ ->
6666
do_add_optional_params(request, definitions, values)

0 commit comments

Comments
 (0)