HttpUtils hu=new HttpUtils(5000);
RequestParams params=new RequestParams();
params.addHeader("Accept", "application/json");
params.addBodyParameter("phone", user);
params.addBodyParameter("password", password);
params.addBodyParameter("_token", MyAppcation.token);
hu.send(HttpRequest.HttpMethod.POST, ApiUtils.UserLoginApi, params, new RequestCallBack<String>() {
@Override
public void onSuccess(ResponseInfo<String> responseInfo) {
LogUtils.i("onSuccess","---------------onSuccess");
}
@Override
public void onFailure(HttpException e, String s) {
LogUtils.i("onFailure",e.getMessage());
}
});
return null;
}
这个是登录请求,用httpPost 返回500。用xutils框架也是跳到onFailure,错误信息也是internal server Erro。浏览器用工具访问api地址可以访问到数据,求大神帮忙
RequestParams params=new RequestParams();
params.addHeader("Accept", "application/json");
params.addBodyParameter("phone", user);
params.addBodyParameter("password", password);
params.addBodyParameter("_token", MyAppcation.token);
hu.send(HttpRequest.HttpMethod.POST, ApiUtils.UserLoginApi, params, new RequestCallBack<String>() {
@Override
public void onSuccess(ResponseInfo<String> responseInfo) {
LogUtils.i("onSuccess","---------------onSuccess");
}
@Override
public void onFailure(HttpException e, String s) {
LogUtils.i("onFailure",e.getMessage());
}
});
return null;
}
这个是登录请求,用httpPost 返回500。用xutils框架也是跳到onFailure,错误信息也是internal server Erro。浏览器用工具访问api地址可以访问到数据,求大神帮忙