We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Override public void post(String url, Map<String, Object> params, final HttpCallBack callBack) { params.put("noncestr", getRandomStr()); params.put("sign", getSign(params)); RequestParams requestParams = new RequestParams(); for (String key : params.keySet()) { requestParams.put(key, params.get(key)); }
// XLog.i("post token = " + RxSPTool.getString(BaseApp.getInstance(), BaseConfig.TOKEN)+ " \npost deviceInfo = " + getDeviceInfo()); // XLog.map(params); client.post(url, requestParams, new AsyncHttpResponseHandler() { @OverRide public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { String result = new String(responseBody); XLog.i("token = " + RxSPTool.getString(BaseApp.getInstance(), BaseConfig.TOKEN)+ " \n \ndeviceInfo = " + getDeviceInfo()+"\n\nURL = " + url+" \n\nparams = "+params +" \n\n"+result); // Class<?> cls = XHttp.analysisClassInfo(callBack); // //我这里使用的是fastjson,你也可以用gson,jackjson等 // XLog.json(result); // // callBack.onSuccess(new Gson().fromJson(result, cls)); callBack.onSuccess(result); }
@Override public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { callBack.onFailed(error.toString()); } }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
// XLog.i("post token = " + RxSPTool.getString(BaseApp.getInstance(), BaseConfig.TOKEN)+ " \npost deviceInfo = " + getDeviceInfo());
// XLog.map(params);
client.post(url, requestParams, new AsyncHttpResponseHandler() {
@OverRide
public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
String result = new String(responseBody);
XLog.i("token = " + RxSPTool.getString(BaseApp.getInstance(), BaseConfig.TOKEN)+ " \n \ndeviceInfo = " + getDeviceInfo()+"\n\nURL = " + url+" \n\nparams = "+params +" \n\n"+result);
// Class<?> cls = XHttp.analysisClassInfo(callBack);
// //我这里使用的是fastjson,你也可以用gson,jackjson等
// XLog.json(result);
//
// callBack.onSuccess(new Gson().fromJson(result, cls));
callBack.onSuccess(result);
}
The text was updated successfully, but these errors were encountered: