mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-03 05:48:42 +00:00
Pleroma.HTTP add AdapterHelper.can_stream? to assist with discovering if the current adapter supports returning a Stream body
This commit is contained in:
parent
5f6506d864
commit
bb279c2802
1 changed files with 9 additions and 0 deletions
|
@ -118,4 +118,13 @@ defmodule Pleroma.HTTP.AdapterHelper do
|
||||||
host_charlist
|
host_charlist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#TODO add Finch support once we have an AdapterHelper for it
|
||||||
|
@spec can_stream? :: bool()
|
||||||
|
def can_stream? do
|
||||||
|
case Application.get_env(:tesla, :adapter) do
|
||||||
|
Tesla.Adapter.Gun -> true
|
||||||
|
_ -> false
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue