Skip to content

Commit

Permalink
Merge pull request #77 from hongyuan1306/master
Browse files Browse the repository at this point in the history
Add content type 'application/json' to request header
  • Loading branch information
elbrujohalcon authored Sep 9, 2019
2 parents 81ad75a + f4e2f20 commit b0497d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tirerl_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ code_change(_OldVsn, State, _Extra) ->
do_request(Req, #{base_url := BaseUrl}) ->
#{method := Method, uri := Uri} = Req,
Body = maps:get(body, Req, <<>>),
Headers = maps:get(headers, Req, []),
Headers = maps:get(headers, Req,
[{<<"Content-Type">>, <<"application/json">>}]),

Body1 = case Body of
Body when is_binary(Body) -> Body;
Expand Down

0 comments on commit b0497d5

Please sign in to comment.