簡體   English   中英

Retrofit2錯誤:Java.lang.IllegalArgumentException:URL查詢字符串“ a = {action}&type = json&key = 15670403”必須沒有替換塊

[英]Retrofit2 error : Java.lang.IllegalArgumentException: URL query string “a={action}&type=json&key=15670403” must not have replace block

對於動態查詢參數,我將@Query用於方法RadioApiClient.getFeeds

以下是我嘗試操作的網址。

//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);

}

我看了看文檔,但似乎沒有按預期工作。

這工作

 @GET("/audio/type=json&key= 1234567890")

    Call<List<Feeds>> getFeeds(@Query("a") String action);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM