summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-05-09 22:48:11 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-05-09 22:48:11 -0400
commit9b2b35ad487768292a4ffb64408e5af1067d3498 (patch)
tree5b555886577b768266dfd41d16a09ae8b1675497
parentparse errors and reduce code duplication (diff)
fix typespec
-rw-r--r--lib/polyjuice/client/endpoint.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/polyjuice/client/endpoint.ex b/lib/polyjuice/client/endpoint.ex
index f6c8247..a328ea9 100644
--- a/lib/polyjuice/client/endpoint.ex
+++ b/lib/polyjuice/client/endpoint.ex
@@ -71,7 +71,7 @@ defmodule Polyjuice.Client.Endpoint do
defprotocol BodyParser do
@fallback_to_any true
- @spec parse(endpoint_args :: __MODULE__.t(), body :: any) :: {:ok, any} | any
+ @spec parse(endpoint_args :: __MODULE__.t(), body :: any) :: any
def parse(endpoint_args, body)
end
@@ -84,7 +84,7 @@ defmodule Polyjuice.Client.Endpoint do
status_code :: integer(),
headers :: [{String.t(), String.t()}, ...],
body :: String.t()
- ) :: {:ok, any} | any
+ ) :: any
def parse_response(%{} = endpoint_args, status_code, headers, body)
when is_integer(status_code) and is_list(headers) and is_binary(body) do
# FIXME: check if content type is "application/json"