Skip to content

Commit

Permalink
content-type necessary in POST request
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbean committed May 19, 2016
1 parent cd8b4d2 commit 82878d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/forcex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ defmodule Forcex do
@user_agent [{"User-agent", "forcex"}]
@accept [{"Accept", "application/json"}]
@accept_encoding [{"Accept-Encoding", "gzip,deflate"}]
@content_type [{"Content-Type", "application/json; charset=UTF-8"}]

def process_request_headers(headers), do: headers ++ @user_agent ++ @accept ++ @accept_encoding
def process_request_headers(headers), do: headers ++ @user_agent ++ @accept ++ @accept_encoding ++ @content_type

def process_headers(headers), do: Map.new(headers)

Expand Down

0 comments on commit 82878d2

Please sign in to comment.