标签:blog http ar os sp java on div 2014
登录时的抓包情况
方法是get
上传 图片时的情况
方法是post ,java代码 如下
HttpUtils http = new HttpUtils(); RequestParams params = new RequestParams(); params.addBodyParameter("token",token ); params.addBodyParameter("file", file); LogUtils.i(TAG, "http params:"+params.toString()); http.send(HttpRequest.HttpMethod.POST, URLConstant.FileServerAddressProxy, params,
同为post ,如果代码为
HttpUtils http = new HttpUtils(); RequestParams params = new RequestParams(); params.addQueryStringParameter("token",token ); params.addBodyParameter("file", file); LogUtils.i(TAG, "http params:"+params.toString()); http.send(HttpRequest.HttpMethod.POST, URLConstant.FileServerAddressProxy, params,
则结果 为
如果 代码 如下
HttpUtils http = new HttpUtils(); RequestParams params = new RequestParams(); params.addHeader("token",token ); params.addBodyParameter("file", file); LogUtils.i(TAG, "http params:"+params.toString()); http.send(HttpRequest.HttpMethod.POST, URLConstant.FileServerAddressProxy, params,
结果 为
原来的上传 图片的抓包
标签:blog http ar os sp java on div 2014
原文地址:http://www.cnblogs.com/chuiyuan/p/4127148.html