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']);
,但不起作用。
問候,
維姆
完美的作品,謝謝! –