天天看點

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: