title: Multipart POST handling with Restlet with a JSON Body
body: <p>I am writing a REST API using Restlet. 
  I am mostly using a JSON as the body of all my POST requests, so a normal POST looks like this in my code: </p>
  
  <pre><code>@Post("json")
  public Representation storeValue(String value){
  JSONObject json = (JSONObject) JSONValue.parse(value);
  String uname = (String)json.get("name");
  ...}
  </code></pre>
  
  <p>I get the JSON String from the request's body and parse it, do my stuff and return a response representation.</p>
  
  <p>Here I want to do one more thing, I have a file (it's an xml, which I guess could be copy pasted inside a json key:value but I would rather avoid that) which has to be sent at the same time as the JSON. My idea is to request my api's users to send a multipart request, with the body as the normal JSON plus an attached file.</p>
  
  <p>I am not too sure how I could do that, I found the FileUpload Restlet extension but very few complete examples of it so I'm not too sure how to use it. </p>
  
  <p>In essence, question is how to retrieve a Body and a File from a Rest multipart request in Restlet 2+.</p>
  
  <p>Sorry for being a bit vague, I am quite lost there.</p>
  
  <p>Thank you in advance.</p>