Skip to content

Commit

Permalink
Fix Avrora.HTTPClient.post/3 guard from binary to map (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
azeemchauhan authored Jan 30, 2025
1 parent ed27101 commit cfc9ca3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/avrora/http_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defmodule Avrora.HTTPClient do

@doc false
@spec post(String.t(), term(), keyword(String.t())) :: {:ok, map()} | {:error, term()}
def post(url, payload, options \\ []) when is_binary(payload) do
def post(url, payload, options \\ []) when is_map(payload) do
with {:ok, body} <- Jason.encode(payload),
{:ok, content_type} <- Keyword.fetch(options, :content_type),
{:ok, headers} <- extract_headers(options),
Expand Down

0 comments on commit cfc9ca3

Please sign in to comment.