summaryrefslogtreecommitdiff
path: root/lib/azure_ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/azure_ex')
-rw-r--r--lib/azure_ex/request.ex8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/azure_ex/request.ex b/lib/azure_ex/request.ex
index 88763f3..c7b1432 100644
--- a/lib/azure_ex/request.ex
+++ b/lib/azure_ex/request.ex
@@ -5,7 +5,7 @@ defmodule AzureEx.Request do
alias AzureEx.{Config, TokenHosting}
- @type method :: :get | :post | :put
+ @type method :: :get | :post | :put | :delete
@type data :: map
@type result :: any
@type error :: any
@@ -55,4 +55,10 @@ defmodule AzureEx.Request do
HTTPoison.put(endpoint, body, headers, Config.timeouts())
end
+
+ defp send(:delete, endpoint, _data) do
+ headers = [Authorization: "Bearer #{TokenHosting.get_token()}"]
+
+ HTTPoison.delete(endpoint, headers, Config.timeouts())
+ end
end