登录时的抓包情况
方法是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,
结果 为
原来的上传 图片的抓包