You must use annotation @Query
for example, for an endpoint:
/pois/category?lat=...&long=..
Your client should look like this:
public interface YourApiClient {
@POST("/pois/category")
Response directions(@Query("lat") double lat, @Query("long") double lng,...);
}
or if you want to use a callback, the client should look like this:
public interface YourApiClient {
@POST("/pois/category")
void directions(@Query("lat") double lat, @Query("long") double lng,..., Callback<Response> callback);
}
source
share