Hello, I need to create HTTPoison.delete
with body , but it shows me error like this :
** (UndefinedFunctionError) function HTTPoison.delete/4 is undefined or private. Did you mean one of:
* delete/1
* delete/2
* delete/3
my code is :
defp delete_sender_json_without_authorization(params, link) do
body = Jason.encode!(params)
HTTPoison.delete(
"#{@link}#{link}",
body,
[
{"Content-Type", "application/json; charset=UTF-8"},
],
[timeout: 50_000, recv_timeout: 50_000]
)
end
end
I searched this and found this link , but he suggested that I should use request
method. this is not good for me because I need to use Delete
method and send some body with it.
How can I fix this , should I use request
method or not ? by the way , my API destination created by DELETE
method
Thanks.