Skip to content

Commit

Permalink
update to latest jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
joelreymont committed Apr 10, 2012
1 parent 25a9556 commit 3dbe0f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ddb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ update_action('delete') -> <<"DELETE">>.
-spec request(string(), json()) -> json_reply().

request(Target, JSON) ->
Body = jsx:to_json(JSON),
Body = jsx:term_to_json(JSON),
lager:debug("request: json = ~p", [Body]),
Headers = headers(Target, Body),
Opts = [{'response_format', 'binary'}],
F = fun() -> ibrowse:request(?DDB_ENDPOINT, [{'Content-type', ?CONTENT_TYPE} | Headers], 'post', Body, Opts) end,
ddb_aws:retry(F, ?MAX_RETRIES, fun jsx:to_term/1).
ddb_aws:retry(F, ?MAX_RETRIES, fun jsx:json_to_term/1).

-spec headers(string(), binary()) -> proplists:proplist().

Expand Down

0 comments on commit 3dbe0f0

Please sign in to comment.