<div dir="ltr">Hi all,<div><br></div><div>I&#39;m not sure if this is the right channel to go for help, but there seems to be no separate user list, so I&#39;ll take a shot here.</div><div><br></div><div>I need to create a HttpHandler that fully reads the request body and stores it into a buffer or byte[] before ending the exchange. For this, I&#39;m trying to digest what Undertow&#39;s RequestBufferingHandler does.</div><div><br></div><div>It seems that I have to take care of the scenario where the handler is called before the entire request body is available on the stream by doing the following:</div><div>- read from the stream</div><div>- check whether I&#39;ve hit the end of the stream when as many bytes as possible have been read</div><div>- if not, register a listener on the stream and continue handling the request from there</div><div>- if so, handle the request from the handler directly</div><div>- finally close the stream</div><div><br></div><div>Can someone assert that the above is correct?</div><div><br></div><div>Also, are there general pointers to what I&#39;d like to achieve (read the request body into a buffer)?</div><div><br></div><div><br></div><div>Many thanks, cheers,</div><div>Friso</div><div><br></div></div>