code: protected <T> T parseBody(Class<T> clazz) throws ParsableException, MediaTypeException {
          String contentType = context.requestContentType();
          
          // if the content type header was not provided, we throw
          if (contentType == null || contentType.isEmpty()) {
              throw new MediaTypeException("Missing media type header");
          }
          
          // extract the actual content type in case charset is also a part of the string
          contentType = HttpHeaderUtil.getContentTypeFromContentTypeAndCharacterSetting(contentType);
          
          ParserEngine engine = injector.getInstance(ParserEngineManager.class).getParserEngineForContentType(contentType);
          
          if (engine == null) {
              throw new MediaTypeException("An engine for media type ("+contentType+") was not found");
          }
          
          try {
              return engine.invoke(context.requestInputStream(), clazz);
          } catch (IOException e) {
              throw new ParsableException(e);
          }
      }
docs: TODO not correctly formulated doc