I am trying to send binary and text data to
servlet. Use case is that client selects a zip file and sends it to the servlet. Along with the zip, some information like username etc. is also send in text form.
To simulate this request, I have created the attached postman request.
How should I handle this request in the servlet. Till now, I only had json coming in the request, so my request processing looked like this
org.json.simple.JSONObject requestBody = (JSONObject) UtilitiesJSON.parseJSON(Util.readText(request.getReader()), true);
Now, that I have both text and binary, how can I process it on the server side? Once I get the zip in the servlet, I need to save it, which should not be a problem once I get a handle on the zip.