You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible/s3/client.ex

18 lines
487 B
Elixir

defmodule Plausible.S3.Client do
@moduledoc false
@behaviour ExAws.Request.HttpClient
@impl true
def request(method, url, body, headers, opts) do
req = Finch.build(method, url, headers, body)
case Finch.request(req, Plausible.Finch, opts) do
{:ok, %Finch.Response{status: status, headers: headers, body: body}} ->
{:ok, %{status_code: status, headers: headers, body: body}}
{:error, reason} ->
{:error, %{reason: reason}}
end
end
end