diff --git a/src/riak_kv_wm_timeseries.erl b/src/riak_kv_wm_timeseries.erl index bde3e0da8b..46f1a7be94 100644 --- a/src/riak_kv_wm_timeseries.erl +++ b/src/riak_kv_wm_timeseries.erl @@ -194,7 +194,7 @@ validate_request(RD, Ctx) -> -spec validate_request_v1(#wm_reqdata{}, #ctx{}) -> ?CB_RV_SPEC. validate_request_v1(RD, Ctx = #ctx{method = 'POST'}) -> - Json = extract_json(RD), + Json = binary_to_list(wrq:req_body(RD)), case extract_data(Json) of Data when Data /= undefined -> valid_params( @@ -228,14 +228,6 @@ validate_request_v1(RD, Ctx = #ctx{method = 'DELETE', table = Table, handle_error(Reason, RD, Ctx) end. -extract_json(RD) -> - case proplists:get_value("json", RD#wm_reqdata.req_qs) of - undefined -> - %% if it was a PUT or POST, data is in body - binary_to_list(wrq:req_body(RD)); - BodyInPost -> - BodyInPost - end. %% because, techically, key and data are 'arguments', we check they %% are well-formed, too.