0
我正在使用Groovy 1.8和HttpBuilder 0.5.1与REST Web界面交谈。我有这样的工作:如何使用httpbuilder和groovy多次使用相同的参数进行GET?
def JSONArray tasks = httpBuilder.get(path: 'workspaces/'+LP_WORKSPACE_ID+'/tasks', query: [filter:'is_done is false']);
def JSONArray tasks = httpBuilder.get(path: 'workspaces/'+LP_WORKSPACE_ID+'/tasks', query: [filter:'external_reference contains /']);
我需要组合这些2到1.我得到了它应该如何看这个文档:
/api/workspaces/:workspace_id/tasks?filter[]=is_done is false&filter[]=external_reference starts with/
如何合并相同的查询变量2倍(过滤器)在同一个GET?
我尝试这样做:
def JSONArray tasks = liquidPlanner.get(path: 'workspaces/'+LP_WORKSPACE_ID+'/tasks', query: ['filter[]':'external_reference contains /', 'filter[]':'is_done is false']);
,但不起作用。
问候,
维姆
完美的作品,谢谢! –