我需要将获取参数发送为:origin=val1,val2
和destination=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.
为什么我得到它?