• 第一次抓包


    登录时的抓包情况 

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

     结果 为

    原来的上传 图片的抓包

     

  • 相关阅读:
    spring mongodb查询
    spring mongodb分页,动态条件、字段查询
    js导航下拉菜单
    spring mongodb增删改查操作
    组件
    vue的基本指令
    远程连接MongoDB数据库
    webpack工具、Vue、react模块化
    layui
    anaconda使用,jupyter notebook的使用方法
  • 原文地址:https://www.cnblogs.com/chuiyuan/p/4127148.html
Copyright © 2020-2023  润新知