rainit2006 / Android-

记录一下Android基本知识
0 stars 0 forks source link

Retrofit2 #13

Open rainit2006 opened 7 years ago

rainit2006 commented 7 years ago
rainit2006 commented 7 years ago

gson http://to-developer.com/blog/?p=1981 https://www.youtube.com/watch?v=oZpv6W3Lflo

rainit2006 commented 7 years ago

@Path, @Query

Consider this is the url:

www.app.net/api/searchtypes/862189/filters?Type=6&SearchText=School

Now this is the call:

@GET("/api/searchtypes/{Id}/filters") Call getFilterList(@Path("Id") long customerId, @Query("Type") String responseType, @Query("SearchText") String searchText); So we have:

www.app.net/api/searchtypes/{Path}/filters?Type={Query}&SearchText={Query}