code: protected HttpRequest createHttpRequest(URI uri, HttpMethod method) {
          HttpRequest request = new HttpRequest();
          request.setUri(uri);
          request.setMethod(method);
  
          // Set authorization header
          request.setHeaders(createHeaders());
  
          return request;
      }
docs: Create an HttpRequest.
  <p>
  Exceptions: Any exception shall be propagated since it's a private method.
  
  @param uri    the URI
  @param method the HttpMethod
  @return the http request
  @throws UnsupportedEncodingException the unsupported encoding exception