diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-04 17:48:55 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-04 17:48:55 +0300 |
commit | dd8aee332cf939f1a76f60a95b117ab90530178b (patch) | |
tree | 509ec960e9bb272183916df8ed3ab929ae936519 /lib | |
parent | 5c6d47614dfd72566a91ac58223902e71ebdf1d3 (diff) | |
download | pleroma-dd8aee332cf939f1a76f60a95b117ab90530178b.tar.gz |
formatting the code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/http/connection.ex | 4 | ||||
-rw-r--r-- | lib/pleroma/http/http.ex | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/pleroma/http/connection.ex b/lib/pleroma/http/connection.ex index f64d4e18e..5e8f2aabd 100644 --- a/lib/pleroma/http/connection.ex +++ b/lib/pleroma/http/connection.ex @@ -1,4 +1,8 @@ defmodule Pleroma.HTTP.Connection do + @moduledoc """ + Connection for http-requests. + """ + @hackney_options [pool: :default] @adapter Application.get_env(:tesla, :adapter) diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index 59afacf4c..4ab12ed3a 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -1,8 +1,10 @@ defmodule Pleroma.HTTP do - require HTTPoison alias Pleroma.HTTP.Connection alias Pleroma.HTTP.RequestBuilder, as: Builder + @doc """ + Builds and perform http request. + """ def request(method, url, body \\ "", headers \\ [], options \\ []) do options = process_request_options(options) @@ -19,6 +21,7 @@ defmodule Pleroma.HTTP do end defp process_sni_options(options, nil), do: options + defp process_sni_options(options, url) do uri = URI.parse(url) host = uri.host |> to_charlist() |