diff options
Diffstat (limited to 'lib/powerdnsex/http_client.ex')
-rw-r--r-- | lib/powerdnsex/http_client.ex | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/powerdnsex/http_client.ex b/lib/powerdnsex/http_client.ex new file mode 100644 index 0000000..0a242b5 --- /dev/null +++ b/lib/powerdnsex/http_client.ex @@ -0,0 +1,16 @@ +defmodule PowerDNSex.HttpClient do + @moduledoc""" + Client to do http requests for PowerDns API + """ + + use HTTPoison.Base + + alias PowerDNSex.Config + + def process_url(url), do: Config.powerdns_url <> url + + defp process_request_headers(headers) do + custom = ["X-API-Key": Config.powerdns_token] + Enum.into(headers, custom) + end +end |