Skip to main content
Feedback

Reading Body Content of Request

  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`.

:::