zoukankan      html  css  js  c++  java
  • 第一次抓包

    登录时的抓包情况 

    方法是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,
    

     结果 为

    原来的上传 图片的抓包

     

  • 相关阅读:
    reduce 一知半解(一):根据id合并两个数组
    textarea去除右下角默认样式
    css禁止点击事件
    poj 2723 二分+2-sat判定
    hdu 3062 2-Sat入门
    poj 3694双联通缩点+LCA
    poj 1986LCA离线dfs+并查集
    poj 1330 LCA最近公共祖先
    poj 1882完全背包变形
    poj 1948二维01背包
  • 原文地址:https://www.cnblogs.com/chuiyuan/p/4127148.html
Copyright © 2011-2022 走看看