public interface SearchMusicCall {
@FormUrlEncoded
@POST()
Call getSearch(@Url String url, @HeaderMap Map headers, @Field("key")String key );
}这是请求接口
SearchMusicCall searchMusicCall = retrofit.create(SearchMusicCall.class);
Call getSearch = searchMusicCall.getSearch(url,headers,key);
getSearch.enqueue(new Callback() {
@Override
public void onResponse(Call call, Response response) {
SearchMusic searchMusic = response.body();
Log.e(TAG,"返回" + searchMusic.getItemnum() + "条数据");
Log.e(TAG,"匹配的总数:" + searchMusic.getTotal());
}
@Override
public void onFailure(Call<SearchMusic> call, Throwable t) {
}
});这是请求,但是一直是为空的!求大神帮忙看看