title: Reading parameters from request body
body: <p>I have following request body.</p>
  
  <p>BODY: code=471b001b-432f-3172-b59f-2b03c7847cf6&amp;client_secret=AtO0zxf62KoYasYTobOGRXVRZXsa&amp;grant_type=authorization_code&amp;client_id=4rYClwGnY4CE_XXAkMCoWuI4mnIa&amp;redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A60746%2Fauthz_cb</p>
  
  <p>I need to read the client_secret parameter from the request body. I'm using below code to read the request body.</p>
  
  <pre><code>Scanner scanner = null;
          try {
              scanner = new Scanner(request.getInputStream());
          } catch (IOException e) {
  
          }
          while (scanner.hasNextLine()) {
              stringBuilder.append(scanner.nextLine());
          }
          String requestBody = stringBuilder.toString();
  </code></pre>
  
  <p>I can create a logic to get the value of client_secret parameter from the requestBody String. But I need to know whether we have a direct way to read parameters from a HTTPRequest Body. </p>
  
  <p>Any suggestion will be highly appreciated.</p>
  
  <p>Thanks.</p>