android retrofit @Query用法
2015-09-01 16:29
465 查看
http://www.b3a4a.com/?id=71
You can also specify query parameters in the URL.
Query parameters can also be added.
//https://login.xx.cn/mobile/login?access_token=A7E3D8CC98776F7C16F328B672221140&openid=40AB4CA325199EC7EF158590A3765CF2&sign=e438f3c32194c696feb78daef0a9b860&t=1441094067
@GET("/mobile/login") 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.
@GET("/users/list?sort=desc")
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
@Pathusing the same string.
@GET("/group/{id}/users") List<User> groupList(@Path("id") int groupId);
Query parameters can also be added.
@GET("/group/{id}/users") List<User> groupList(@Path("id") int groupId, @Query("sort") String sort)
相关文章推荐
- 8.10.3 The MySQL Query Cache
- 被曝红米Note 2屏幕和摄像头偷梁换柱后,小米换图,删帖,发声明
- div设置contentEditable="true"作为文本编辑器,定位光标解决办法
- LeetCode Distinct Subsequences DP
- UILabel圆角、边框、宽度自适应
- QuickServer自学笔记(一)
- *** Assertion failure in -[CompensaCommentView _dequeueReusableViewOfType:withIdentifier:],
- 详解 CALayer 和 UIView 的区别和联系
- 使用pytest+requests进行接口测试实践——测试post请求
- MySQL高速缓存启动方法及参数详解query_cache_size=32M query_cache_type=1
- MySQL高速缓存启动方法及参数详解query_cache_size=32M query_cache_type=1
- MySQL高速缓存启动方法及参数详解query_cache_size=32M query_cache_type=1
- 利用Runtime修改UIdatePicker的字体颜色
- Android学习笔记之DocumentBuilder的使用....
- [Bluetooth(SDK)]使用WinSock连接到远程设备
- 使用pytest+requests进行接口测试实践——测试get请求
- #inception# Follow Your Heart and Persue Your Dream
- uva live 5031 Graph and Queries(Treap x 并查集)
- Myslq 启动报错The server quit without updating PID file
- 【iOS知识学习】_iPhone学习多个UITextField 键盘弹起