Closed austinrappa78 closed 2 years ago
This appears to be a reversion from https://github.com/SoftInstigate/restheart/issues/299
In order to use undertow's FormParser
you need a custom Request
.
This is needed because ByteArrayRequest
(like any other Request
implementation) consumes the request body; that's why you get the error getRequestChannel() has already been called
from FormParser
.
I created an example with a possibile implementation at https://github.com/SoftInstigate/restheart-examples/tree/master/form-handler
Confirmed it worked and can accept FormData.
When creating a plugin to read form data, this error is thrown:
Expected Behavior
Read form data.
Current Behavior
Context
Upgrading from v3 to v6
Environment
Steps to Reproduce
Create html
Create plugin
Possible Implementation
Please include an example of a FormData plugin in your plugin-examples project.