Reading Body Content of Request

Procedure

  1. In the request, get the ContentSource.
  2. From the ContentSource, get the inputStream.
  3. Read content from the InputStream.
    ContentSource body = event.getCallContext().getRequest().getBody();
    final InputStream inputStream = body.getInputStream() ;
    //use input stream to read content
    //Do something with the content
    Note:

    Refer working code in examples/ReadRequestBody.java.