天天看点

fiddler发送post请求

  Content-Type: application/x-www-form-urlencoded;charset=utf-8

  request body中的参数格式:userName=adminicxp&userPassword=123qwe!@#

fiddler发送post请求

   这种方式可以用 request.getParameter的方式来获得。

  Content-Type: application/json; charset=utf-8

  request body中的参数格式:

fiddler发送post请求

  这种方式通过如下方式获得:

  public String getBodyString(BufferedReader br) {

    String inputLine;

    String str = "";

    try {

      while ((inputLine = br.readLine()) != null) {

      str += inputLine;

    }

      br.close();

    } catch (IOException e) {

      System.out.println("IOException: " + e);

    return str;

  }

  方式1:

  springmvc 后台java代码

  fiddler 请求

  方式2: