diff options
Diffstat (limited to 'lib/polyjuice/client/endpoint/get_sync.ex')
-rw-r--r-- | lib/polyjuice/client/endpoint/get_sync.ex | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/polyjuice/client/endpoint/get_sync.ex b/lib/polyjuice/client/endpoint/get_sync.ex index c30e680..511fb21 100644 --- a/lib/polyjuice/client/endpoint/get_sync.ex +++ b/lib/polyjuice/client/endpoint/get_sync.ex @@ -84,14 +84,8 @@ defmodule Polyjuice.Client.Endpoint.GetSync do } end - def transform_http_result(_req, status_code, _resp_headers, body) do - case status_code do - 200 -> - {:ok, Poison.decode!(body)} - - _ -> - {:error, status_code, body} - end + def transform_http_result(req, status_code, resp_headers, body) do + Polyjuice.Client.Endpoint.parse_response(req, status_code, resp_headers, body) end end end |