summaryrefslogtreecommitdiff
path: root/lib/powerdnsex/http_client.ex
diff options
context:
space:
mode:
authorLindolfo 'Lorn' Rodrigues <lorn@lornlab.org>2020-03-17 19:30:34 -0300
committerLindolfo 'Lorn' Rodrigues <lorn@lornlab.org>2020-03-19 23:29:50 -0300
commit6589586f985b466194a6553c50ab3f7419a13b7f (patch)
treecdb94939b65877c420abd60a26f3eab595b9aae6 /lib/powerdnsex/http_client.ex
parentMerge pull request #14 from locaweb/fix-docs (diff)
Timeout option
Now, you need to pass the timeout for the PowerDNS API in seconds We need to add the timeout to the GenServer.call function
Diffstat (limited to '')
-rw-r--r--lib/powerdnsex/http_client.ex6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/powerdnsex/http_client.ex b/lib/powerdnsex/http_client.ex
index 13e5023..3431795 100644
--- a/lib/powerdnsex/http_client.ex
+++ b/lib/powerdnsex/http_client.ex
@@ -13,4 +13,10 @@ defmodule PowerDNSex.HttpClient do
custom = ["X-API-Key": Config.powerdns_token()]
Keyword.merge(headers, custom)
end
+
+ def process_request_options(options) do
+ custom_options = [ssl: [{:versions, [:'tlsv1.1']}], recv_timeout: Config.powerdns_timeout()]
+ Keyword.merge(options, custom_options)
+ end
+
end