Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求失败 #2

Open
dxl-enter opened this issue Nov 23, 2018 · 2 comments
Open

请求失败 #2

dxl-enter opened this issue Nov 23, 2018 · 2 comments

Comments

@dxl-enter
Copy link

我设置的
public static String BASE_URL = "https://api.douban.com/v2/movie/";
@get("top250")
Observable getDataForMap(@QueryMap Map<String,Integer> map);
在MainActivity中调用getData后请求失败(保证参数已经传进去)

@bigeyechou
Copy link
Owner

亲,你去返回的next方法,也就是成功失败回调的那个方法修改一下返回参数的拦截重新包装一下,我的例子已经不是豆瓣的了

@bigeyechou
Copy link
Owner

查了下这个接口, "https://api.douban.com/v2/movie/top250" 豆瓣的这个接口需要在重新配置okHttpBuilder.addInterceptor( );请求头需要添加token和userid的头信息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants