code: public void sign(RequestT request, MutableRequestT requestToUpdate) throws RequestSigningException {
          Request req = map(request);
          ClientCredential credential;
          try {
              credential = clientCredentialProvider.getClientCredential(req);
          } catch (NoMatchingCredentialException e) {
              throw e;
          }
          if (credential == null) {
              throw new NoMatchingCredentialException();
          }
          String newHost = credential.getHost();
          URI originalUri = Objects.requireNonNull(requestUri(request), "Request-URI cannot be null");
          URI newUri = withNewHost(originalUri, newHost);
          setHost(requestToUpdate, newHost, newUri);
          String authorization = edgeGridSigner.getSignature(req, credential);
          setAuthorization(requestToUpdate, authorization);
      }
docs: Signs {@code request} with appropriate credentials using EdgeGrid signer algorithm and
  replaces {@code request}'s host name with the one specified by the credential.
  
  @param request an HTTP request with data used to sign
  @param requestToUpdate an HTTP request to update with signature
  @throws RequestSigningException       if failed to sign a request
  @throws NoMatchingCredentialException if acquiring a {@link ClientCredential} throws {@code
  NoMatchingCredentialException} or returns {@code null}