几种Retrofit拼接网址方式

package com.bw.com.zuoye0316.api;

import com.bw.com.zuoye0316.bean.JsonBean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

ic interface ApiServer {
@GET(“page_{page}”)
Call<List>getUrl(@Path(“page”)String page);

//http://gank.io/api/data/%E7%A6%8F%E5%88%A9/10/1
@GET("data/%E7%A6%8F%E5%88%A9/10/{page}")
Call<WealInfo> getWeal(@Path("page") int page);

//http://www.93.gov.cn/93app/data.do?channelId=1&startNum=1

@GET("data.do")
Call<NewsInfo> getNews(@Query("channelId") int channelId, @Query("startNum") int startNum);

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值