From 7c26f73fe77893fbccffe432eb2be25ba5eafe7f Mon Sep 17 00:00:00 2001 From: Mike Cifelli <26522946+macifell@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:33:57 -0500 Subject: [PATCH] Fix authorization header --- lib/recognizer/hal.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/recognizer/hal.ex b/lib/recognizer/hal.ex index 19e5047..e4fc441 100644 --- a/lib/recognizer/hal.ex +++ b/lib/recognizer/hal.ex @@ -7,7 +7,7 @@ defmodule Recognizer.Hal do req = "/accounts/newsletter/interests" |> build_url() - |> HTTPoison.get!(authentication_headers()) + |> HTTPoison.get!(authorization_headers()) interests = Jason.decode!(req.body)["interests"] @@ -19,7 +19,7 @@ defmodule Recognizer.Hal do req = "/accounts/newsletter?email_address=#{user["email"]}" |> build_url() - |> HTTPoison.get!(authentication_headers()) + |> HTTPoison.get!(authorization_headers()) status = Jason.decode!(req.body)["status"] @@ -40,7 +40,7 @@ defmodule Recognizer.Hal do "/accounts/newsletter" |> build_url() - |> HTTPoison.post!(body, [{"content-type", "application/json"}] ++ authentication_headers()) + |> HTTPoison.post!(body, [{"content-type", "application/json"}] ++ authorization_headers()) end end @@ -49,7 +49,7 @@ defmodule Recognizer.Hal do Path.join([base_url, path]) end - defp authentication_headers() do - [{"authentication", "Recognizer #{Application.get_env(:recognizer, :hal_token)}"}] + defp authorization_headers() do + [{"authorization", "Recognizer #{Application.get_env(:recognizer, :hal_token)}"}] end end