title: Reader for MIME media type text/html; charset=UTF-8 was not found
body: <p>Im trying to get a swagger-codgen generated jersey API library to fly with https (SSL).</p>
  
  <p>It was working fine with only http like this:</p>
  
  <pre><code>  public ApiClient rebuildHttpClient() {
      // Add the JSON serialization support to Jersey
      JacksonJsonProvider jsonProvider = new JacksonJsonProvider(objectMapper);
      DefaultClientConfig conf = new DefaultClientConfig();
      conf.getSingletons().add(jsonProvider);
      Client client = Client.create(conf);
      if (debugging) {
        client.addFilter(new LoggingFilter());
      }
      this.httpClient = client;
      return this;
    }
  </code></pre>
  
  <p>But then I tried to set up SSL like this</p>
  
  <pre><code>public ApiClient rebuildHttpClient() {
      // Add the JSON serialization support to Jersey
      JacksonJsonProvider jsonProvider = new JacksonJsonProvider(objectMapper);
  
      TrustManager[] byPassTrustManagers = new TrustManager[] { new X509TrustManager() {
  
        public X509Certificate[] getAcceptedIssuers() {
          return new X509Certificate[0];
        }
  
        public void checkClientTrusted(X509Certificate[] chain, String authType) {  }
  
        public void checkServerTrusted(X509Certificate[] chain, String authType) {   }
  
      } };
  
  
      HostnameVerifier hostnameVerifier = HttpsURLConnection.getDefaultHostnameVerifier();
  
      ClientConfig config = new DefaultClientConfig();
  
      SSLContext ctx = null;
      try {
        ctx = SSLContext.getInstance("SSL");
      } catch (NoSuchAlgorithmException e) {
        e.printStackTrace();
      }
      try {
        ctx.init(null, byPassTrustManagers, null);
      } catch (KeyManagementException e) {
        e.printStackTrace();
      }
      config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(hostnameVerifier, ctx));
      config.getSingletons().add(jsonProvider);
  
      Client client = Client.create(config);
  
      if (debugging) {
        client.addFilter(new LoggingFilter());
      }
      this.httpClient = client;
      return this;
    }
  </code></pre>
  
  <p>It builds fine but when executed, I get this error</p>
  
  <blockquote>
    <p>A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type text/html; charset=UTF-8 was not found
    08-12 13:43:41.230 12544-12861/com.xxxxxx.app.xxxxx E/ClientResponse: The registered message body readers compatible with the MIME media type are:
                                                                             <em>/</em> ->
                                                                               com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider</p>
  </blockquote>
  
  <p>When executing this method in my ApiClient  (trying to authenticate)</p>
  
  <pre><code> private void updateParamsForAuth(String[] authNames, List&lt;Pair&gt; queryParams, Map&lt;String, String&gt; headerParams) {
      for (String authName : authNames) {
        Authentication auth = authentications.get(authName);
      if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
      auth.applyToParams(queryParams, headerParams);
      }
  }
  </code></pre>
  
  <p>When I test the server response with swagger-ui it shows that it is in the right type <strong>application/json</strong></p>
  
  <p>It seams to have something with the serverside to do? Becouse it worked fine a couple of days and then suddently the error cameback with out me changeing the code client side.</p>