code: @Override
      public STATE onHeadersReceived(HttpResponseHeaders headers) throws Exception {
  
          List<String> ct = headers.getHeaders().get("Content-Type");
          if (ct == null || ct.size() == 0 || !ct.get(0).contains("text/event-stream")) {
              status = Socket.STATUS.ERROR;
              throw new TransportNotSupported(500, "Invalid Content-Type" + ct);
          }
  
          return super.onHeadersReceived(headers);
      }
docs: {@inheritDoc}