analytics / lib /plausible /s3 /client.ex
Leon4gr45's picture
Upload folder using huggingface_hub (part 2)
8da2481 verified
Raw
History Blame Contribute Delete
487 Bytes
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