-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't pass in non-empty body when querying view
- Loading branch information
Zachary Hueras
committed
Oct 15, 2014
1 parent
00c4a4b
commit 9334317
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
%%% @author Ali Yakamercan <[email protected]> | ||
%%% @copyright 2012-2013 Chitika Inc. | ||
%%% @version 0.0.2 | ||
%%% @version 0.0.3 | ||
|
||
-module(cberl). | ||
-vsn("0.0.3"). | ||
-include("cberl.hrl"). | ||
|
||
-export([start_link/2, start_link/3, start_link/5, start_link/6, start_link/7]). | ||
|
@@ -282,7 +283,7 @@ view(PoolPid, DocName, ViewName, Args) -> | |
Path = string:join(["_design", DocName, "_view", ViewName], "/"), | ||
Resp = case proplists:get_value(keys, Args) of | ||
undefined -> %% FIXME maybe not have to pass in an empty json obj here | ||
http(PoolPid, string:join([Path, query_args(Args)], "?"), "{}", "application/json", get, view); | ||
http(PoolPid, string:join([Path, query_args(Args)], "?"), "", "application/json", get, view); | ||
Keys -> | ||
http(PoolPid, string:join([Path, query_args(proplists:delete(keys, Args))], "?"), binary_to_list(jiffy:encode({[{keys, Keys}]})), "application/json", post, view) | ||
end, | ||
|