android retrofit @Query用法

void getMyMessage(@Query("access_token") String access_token, @Query("openid") String openId, @Query("sign") String sign, @Query("t") String t, Callback<StatusBean> callback);




You can also specify query parameters in the URL.



URL Manipulation

A request URL can be updated dynamically using replacement blocks and parameters on the method. A replacement block is an alphanumeric string surrounded by { and }. A corresponding parameter must be annotated with @Path using the same string.

List<User> groupList(@Path("id") int groupId);


Query parameters can also be added.

List<User> groupList(@Path("id") int groupId, @Query("sort") String sort)
posted @ 2015-09-01 16:29  wanqi  Views(2813)  Comments(0Edit  收藏