code: private Map<String, Object> getBodyAsDictionary() throws CouchbaseLiteException {
          // check if content-type is `application/json`
          String contentType = getRequestHeaderContentType();
          if (contentType != null && !contentType.equals(CONTENT_TYPE_JSON))
              throw new CouchbaseLiteException(Status.NOT_ACCEPTABLE);
  
          // parse body text
          // NOTE: contentStream should not be close immediately. It will close Socket connection.
          InputStream contentStream = connection.getRequestInputStream();
          try {
              return Manager.getObjectMapper().readValue(contentStream, Map.class);
          } catch (JsonParseException jpe) {
              throw new CouchbaseLiteException(Status.BAD_JSON);
          } catch (JsonMappingException jme) {
              throw new CouchbaseLiteException(Status.BAD_JSON);
          } catch (IOException ioe) {
              throw new CouchbaseLiteException(Status.REQUEST_TIMEOUT);
          }
      }
docs: content-type: application/json