code: private Map<String, Object> getMultipartBodyAsDictionary() throws CouchbaseLiteException {
          MultipartDocumentReader reader = new MultipartDocumentReader(db);
          reader.setHeaders(Utils.headersToMap(connection.getRequestProperties()));
          byte[] buffer = new byte[BUF_LEN];
          int numBytesRead;
          InputStream contentStream = connection.getRequestInputStream();
          try {
              while ((numBytesRead = contentStream.read(buffer)) != -1)
                  reader.appendData(buffer, 0, numBytesRead);
          } catch (IOException ioe) {
              Log.e(Log.TAG_ROUTER, "Error in load data from stream.");
              throw new CouchbaseLiteException(Status.BAD_REQUEST);
          } finally {
              if (contentStream != null) {
                  try {
                      contentStream.close();
                  } catch (IOException ioe) {
                  }
              }
          }
          reader.finish();
          return reader.getDocumentProperties();
      }
docs: content-type: multipart/json