Skip to content

Commit

Permalink
style: improves legibility
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Aug 2, 2024
1 parent 1fa428b commit ce79d7f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions lib/tower_rollbar/rollbar/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ defmodule TowerRollbar.Rollbar.Client do
@access_token_header ~c"X-Rollbar-Access-Token"

def post(path, payload) when is_map(payload) do
case :httpc.request(
:post,
{
~c"#{@base_url}#{path}",
[{@access_token_header, access_token()}],
~c"application/json",
Jason.encode!(payload)
},
[
ssl: tls_client_options()
],
[]
) do
:httpc.request(
:post,
{
~c"#{@base_url}#{path}",
[{@access_token_header, access_token()}],
~c"application/json",
Jason.encode!(payload)
},
[
ssl: tls_client_options()
],
[]
)
|> case do
{:ok, result} ->
result
|> IO.inspect()
Expand Down

0 comments on commit ce79d7f

Please sign in to comment.