Hi Todd,
Thanks for that response. As you might have guessed, I have a few follow up questions :D
There's a sample HTTP upload example (Java based) in the Netty source code, which I've tested and it seems to be working fine. I'm still trying to understand the different pieces of it, but I have a decent understanding of how it works.
The pipeline looks like this:
HttpRequestDecoder
HttpResponseEncoder
HttpContentCompressor
HttpUploadServerHandler - the class which handles the actual file receive
I modified the example to save onto disk locally, the file which is sent by the Client (Which is also provided as a Java program)
My questions are:
1. How would I go "outside" RestExpress for a specific route ("/upload" for example), but still keep RestExpress for all the other routes? I have the pipeline ready for upload from the sample program, and I am OK with the default RestExpress pipeline for all the other APIs. Is this possible?
2. Can RestExpress support listening to multiple ports on the same server instance? Like, file uploads on port XXXX and the rest of the APIs on port YYYY? This kinda ties to the previous question I suppose..
"And it also performs deserialization on incoming JSON payloads only after the entire dataset has been received"3. When you said the above, did you mean the code in DefaultRequestHandler::processRequest in the RE code base? Could you elaborate a bit more?
Thinking on the same lines, if a client were to throw a "multipart/form-data" request to an RE server as of now, would I be able to configure a controller to read those parts individually without consuming too much memory?
4. In one of the Github issues (
issue 22), you mention this:
Multi-part uploads work fine and the results "get" to the controller in the request. Other clients have performed multi-part parsing in the controller method itself and things seem to work fine. Perhaps we can get them to submit their controller logic back to the project...
Would you happen to have access to some of this code so that I can draw some hints from the same?
And what did you mean by the results "get" to the controller? You mean the "read" method in the controller? How would a POST request from the client, go to the "get" on the controller?
Thanks,
Murali