I am trying to send a request to the Google GeoCode API using Retrofit. The service interface looks like this:
public interface FooService {
@GET(\"
AFAIK, {...} can only be used as a path, not inside a query-param. Try this instead:
public interface FooService {
@GET("/maps/api/geocode/json?sensor=false")
void getPositionByZip(@Query("address") String address, Callback cb);
}
If you have an unknown amount of parameters to pass, you can use do something like this:
public interface FooService {
@GET("/maps/api/geocode/json")
@FormUrlEncoded
void getPositionByZip(@FieldMap Map params, Callback cb);
}