retrofit
文章平均质量分 93
_无问西东
愿你在被打击时,记起你的珍贵,抵抗恶意,愿你在迷茫时,坚信你的珍贵,爱你所爱,行你所行,听从内心,无问西东。
展开
-
Retrofit 注解学习 @GET @POST @Query @QueryMap @Field @FieldMap @Body ...
1、Retrofit 注解脉络图2、请求类2.1.1 @GET对应get网络请求结合@Path、@Query、@QueryMap使用GET后面的url中可以使用自定义的变量,如 {id}、{userId}进行占位,并使用 @Path("id") 、@Path("userId") 注解为 {id} 、{userId}提供值如下:注意形如形如“?page/xxx/id/...原创 2018-09-06 21:25:19 · 33061 阅读 · 2 评论 -
Retrofit 基本使用
内容导图1、依赖库导入implementation 'com.squareup.retrofit2:retrofit:2.4.0'implementation 'com.squareup.retrofit2:converter-gson:2.3.0'2、基本使用2.1、定义请求接口import hq.demo.net.model.WeatherBeans;impo...原创 2018-09-06 00:33:01 · 685 阅读 · 0 评论