zoukankan      html  css  js  c++  java
  • HttpRequester测试接口软件

    第一步:打开火狐

     用火狐登录该路径,打开HttpRequester调试弹窗

    后台:

    1.打该接口的断点

    前台页面:

    2.谷歌页面测试改接口,F12 ----》 点击提交--获取请求url

    HttpRequester软件

    3.复制请求url---到---HttpRequester--url里面

    4.选择(重点

    Content-Type  :  application/json  ---媒体类型格式
    5.创造虚拟参数
    { “页面字段”:“虚拟值”, “页面字段”:“虚拟值”, “页面字段”:“虚拟值”,}
    6.点击  按钮请求
       post : ctroller参数类型(@RequestBody 实体VO )
       get : ctroller参数类型(String id 或者String name或者其他参数)---这种情况根据;前端页面URL&参数(id/name/其他参数)
      HttpServletRequest request,HttpServletResponse response -一般用于接收文件+表单提交,这是@RequestBody检测不出来的 ---所以在--  后端关键性代码ReflectUtil.invokeSetMethod4Field(courseVo(表单用于接收所有的参数实体), fieldName(附件), new String(item.get(),(底层利用invoke和clazz,getClass()获取new出新的对象,不用data接收,这就是反射)用 反射get值) "UTF-8(设置编码集)"));
    7.点击submit按钮后,跳转后端断点页面
      ---针对post,get 查看ctroller(传输类型是否取到虚拟值)-,实体和参数,
      ---针对HttpServletRequest request,HttpServletResponse response -,进入ReflectUtil.invokeSetMethod4Field(查看后端数据是或否拿到)
     
  • 相关阅读:
    leetcode第35题--Valid Sudoku
    leetcode 34 Search Insert Position
    leetcode第33题--Search for a Range
    leetcode第32题--Search in Rotated Sorted Array
    leetcode第31题--Longest Valid Parentheses
    leetcode第30题--Next Permutation
    leetcode第29题--Substring with Concatenation of All Words
    leetcode第28题--Divide Two Integers
    leetcode第27题--Implement strStr()
    17_7_7 JDBC存储过程 + 事务
  • 原文地址:https://www.cnblogs.com/Darkqueen/p/9147743.html
Copyright © 2011-2022 走看看