更新时间:2023-02-15 13:39:38
您应该使用以下语法:
@GET("/my/API/call")
Response getMyThing(
@Query("param1") String param1,
@Query("param2") String param2);
在 URL 中指定查询参数仅适用于您知道键和值并且它们是固定的.
Specifying query parameters in the URL is only for when you know both the key and value and they are fixed.