private ContentType getContentType(String headerValue) throws ApiException {
    try {
      return ContentType.parse(headerValue);
    } catch (ParseException e) {
      throw new ApiException("Could not parse content type " + headerValue);
    }
  }
Parse content type object from header value
plc4j/drivers/ctrlx/src/main/java/org/apache/plc4x/java/ctrlx/readwrite/rest/datalayer/ApiClient.java