code: private Transport createTransport(final String profile) {
          if (getCaCapabilities(profile).isPostSupported()) {
              return transportFactory.forMethod(Method.POST, url);
          } else {
              return transportFactory.forMethod(Method.GET, url);
          }
      }
docs: Creates a new transport based on the capabilities of the server.
  
  @param profile
  profile to use for determining if HTTP POST is supported
  @return the new transport.