code: public static HttpRequestExecutor create(final String hostname, final String cookieValue) throws GeneralSecurityException, IOException {
  		final String cookie = new StringBuilder()
  			.append(Request.COOKIE_NAME)
  			.append('=')
  			.append(cookieValue)
  			.toString();
  		final HttpTransport transport = GoogleNetHttpTransport.newTrustedTransport();
  		final HttpRequestFactory requestFactory = transport.createRequestFactory(request -> {
  			final HttpHeaders headers = request.getHeaders();
  			headers.setCookie(cookie);
  		});
  		return new HttpRequestExecutor(hostname, requestFactory, cookieValue);
  	}
docs: Static factory method that creates a {@link HttpRequestExecutor} instance
  which is set using the given <tt>cookie</tt> for building authenticated
  HTTP request.
  
  @param hostname Hostname to use for the created executor.
  @param cookieValue Value of the SACSID cookie to use.
  @return Created instance.
  @throws IOException If any error occurs while creating http client.
  @throws GeneralSecurityException If any error occurs while creating http client.