I'm writing a domino agent to handle POST requests that contain attachments and fields to use as metadata. The encoding is multipart/form-data. Domino exposes an in-memory document called the document context which has a field called 'Request_Content' (or 'Request_Content_000... nnn' for attachments > 64k). It's easy enough to get this but then I need to decode it to get field values and file attachments. What can I use to decode this? Or am I better off using a servlet and the HttpServlet class, or is there a solution using xAgents?
The server is version 9.0.1.
Code snippet as follows:
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Document documentContext = agentContext.getDocumentContext();
Vector requestContent = documentContext.getItemValue("Request_Content");
//.. now what?