mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
Avoid unnecessarily collapsing iodata in request bodies
This commit is contained in:
parent
b3c5396a45
commit
e69d3aca4e
1 changed files with 2 additions and 2 deletions
|
@ -46,10 +46,10 @@ defmodule PhilomenaQuery.Search.Client do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp encode_body(body) when is_map(body),
|
defp encode_body(body) when is_map(body),
|
||||||
do: Jason.encode!(body)
|
do: Jason.encode_to_iodata!(body)
|
||||||
|
|
||||||
defp encode_body(body) when is_list(body),
|
defp encode_body(body) when is_list(body),
|
||||||
do: [Enum.map_intersperse(body, "\n", &Jason.encode!(&1)), "\n"]
|
do: [Enum.map_intersperse(body, "\n", &Jason.encode_to_iodata!(&1)), "\n"]
|
||||||
|
|
||||||
defp encode_options,
|
defp encode_options,
|
||||||
do: [headers: request_headers(), receive_timeout: @receive_timeout]
|
do: [headers: request_headers(), receive_timeout: @receive_timeout]
|
||||||
|
|
Loading…
Reference in a new issue