Skip to content

Commit

Permalink
Add content-type to requests
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Aug 22, 2017
1 parent 0557d0f commit 7a9e4cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/erls_resource.erl
Expand Up @@ -48,7 +48,8 @@ request(State, Method, Path, Headers, Params, Body, Options) ->
Props -> <<"?", (encode_query(Props))/binary>>
end)/binary>>,
{Headers2, Options1, Body} = make_body(Body, Headers, Options),
do_request(State, Method, Path1, Headers2, Body, Options1).
Headers3 = default_header(<<"Content-Type">>, <<"application/json">>, Headers2),
do_request(State, Method, Path1, Headers3, Body, Options1).

do_request(#erls_params{host=Host, port=Port, timeout=Timeout, ctimeout=CTimeout},
Method, Path, Headers, Body, Options) ->
Expand Down

0 comments on commit 7a9e4cb

Please sign in to comment.