[英]Retrofit2 error : Java.lang.IllegalArgumentException: URL query string “a={action}&type=json&key=15670403” must not have replace block
For dynamic query parameters I'm using @Query
for method RadioApiClient.getFeeds
对于动态查询参数,我将
@Query
用于方法RadioApiClient.getFeeds
Below is the URL I am trying to manipulate. 以下是我尝试操作的网址。
//api.broadcastify.com/audio/?a=feeds&type=json&key=1234567890
public interface RadioApiClient {
String BASE_URL = "http://api.broadcastify.com";
@GET("/audio/?a={action}&type=json&key=1234567890")
Call<List<Feeds>> getFeeds(@Query("a") String action);
}
I looked at the documentation but it doesn't seem to be working as expected. 我看了看文档,但似乎没有按预期工作。
This worked 这工作
@GET("/audio/type=json&key= 1234567890")
Call<List<Feeds>> getFeeds(@Query("a") String action);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.