Skip to content

Commit 9ab9be8

Browse files
committed
ex_aws config
1 parent a41d59d commit 9ab9be8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

config/config.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ config :hexdocs, :docs_private_bucket, name: "hexdocs-private-staging"
4141

4242
config :hexdocs, :docs_public_bucket, name: "hexdocs-public-staging"
4343

44+
config :ex_aws,
45+
http_client: ExAws.Request.Hackney,
46+
json_codec: Jason
47+
4448
config :logger, :console, format: "[$level] $metadata$message\n"
4549

4650
import_config "#{Mix.env()}.exs"

config/prod.exs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ config :hexdocs, :docs_private_bucket, implementation: Hexdocs.Store.GS
1414

1515
config :hexdocs, :docs_public_bucket, implementation: Hexdocs.Store.GS
1616

17-
config :ex_aws,
18-
json_codec: Jason
19-
2017
config :sentry,
2118
enable_source_code_context: true,
2219
root_source_code_paths: [File.cwd!()],

lib/hexdocs/http.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ defmodule Hexdocs.HTTP do
2424
end
2525

2626
def post(url, headers, body, opts \\ []) do
27-
:hackney.post(url, headers, body, opts)
28-
|> read_response()
27+
if :with_body in opts do
28+
:hackney.post(url, headers, body, opts)
29+
else
30+
:hackney.post(url, headers, body, opts)
31+
|> read_response()
32+
end
2933
end
3034

3135
def delete(url, headers, opts \\ []) do

0 commit comments

Comments
 (0)