code: @Override
      public String getDefaultDomain() throws IOException {
          final String sourceMethod = "getDefaultDomain";
          checkConnection();
  
          URL defaultDomainURL = null;
          HttpsURLConnection connection = null;
          try {
              // Get URL for default domain
              defaultDomainURL = getDefaultDomainURL();
  
              // Get connection to server
              connection = getConnection(defaultDomainURL, HttpMethod.GET);
          } catch (IOException io) {
              throw getRequestErrorException(sourceMethod, io, defaultDomainURL);
          }
  
          // Check response code from server
          int responseCode = 0;
          try {
              responseCode = connection.getResponseCode();
          } catch (ConnectException ce) {
              recoverConnection(ce);
              // Server is down; not a client bug
              throw ce;
          }
  
          switch (responseCode) {
              case HttpURLConnection.HTTP_OK:
                  JSONConverter converter = JSONConverter.getConverter();
                  try {
                      // Process and return server response
                      return converter.readString(connection.getInputStream());
                  } catch (Exception e) {
                      throw getResponseErrorException(sourceMethod, e, defaultDomainURL);
                  } finally {
                      JSONConverter.returnConverter(converter);
                  }
              case HttpURLConnection.HTTP_BAD_REQUEST:
              case HttpURLConnection.HTTP_INTERNAL_ERROR:
                  // Server response should be a serialized Throwable
                  Throwable t = getServerThrowable(sourceMethod, connection);
                  IOException ioe = t instanceof IOException ? (IOException) t : new IOException(RESTClientMessagesUtil.getMessage(RESTClientMessagesUtil.UNEXPECTED_SERVER_THROWABLE), t);
                  throw ioe;
              case HttpURLConnection.HTTP_UNAUTHORIZED:
              case HttpURLConnection.HTTP_FORBIDDEN:
                  throw getBadCredentialsException(responseCode, connection);
              case HttpURLConnection.HTTP_GONE:
              case HttpURLConnection.HTTP_NOT_FOUND:
                  IOException io = getResponseCodeErrorException(sourceMethod, responseCode, connection);
                  recoverConnection(io);
                  throw io;
              default:
                  throw getResponseCodeErrorException(sourceMethod, responseCode, connection);
          }
      }
docs: {@inheritDoc}