android 怎么通过post 返回json数据
1个回答
展开全部
RequestParams params = new RequestParams();
params.put("uparam", client.get("sn"));
new FinalAsyncHttpClient(getActivity()).getAsyncHttpClient().post(URL +, params, new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
super.onSuccess(statusCode, headers, response);
//resposne就是JSON数据
}
params.put("uparam", client.get("sn"));
new FinalAsyncHttpClient(getActivity()).getAsyncHttpClient().post(URL +, params, new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
super.onSuccess(statusCode, headers, response);
//resposne就是JSON数据
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询