数组查询改造

时间:2015-05-27 02:16:34

标签: android retrofit

我需要将获取参数发送为:origin=val1,val2destination=val1,val2但我无法找到方法。

我在尝试:

String url = "/api/directions?origin={olon},{olat}&destination={dlon},{dlat}R";

@POST(url) void getInfoBetween(@Path("olon") double originLon, @Path("olan") double originLat,@Path("dlon") double destLon,    @Path("dlan") double destLan,Callback<MapsResponse> callback);

但我明白了:

 Caused by: retrofit.RetrofitError: LocationService.getInfoBetween: 
 URL query string "origin={olon},{olat}" must not have replace block. 
 For dynamic query parameters use @Query.

为什么我得到它?

0 个答案:

没有答案