private HttpTransport getHttpTransport(boolean secureTransport) {
    HttpTransport transport =
        secureTransport ? secureHttpTransportFactory.get() : insecureHttpTransportFactory.get();
    synchronized (transportsCreated) {
      transportsCreated.add(transport);
    }
    return transport;
  }
Sends the request.

@param httpMethod the HTTP request method
@param url endpoint URL
@param request the request to send
@return the response to the sent request
@throws IOException if building the HTTP request fails.
jib-core/src/main/java/com/google/cloud/tools/jib/http/FailoverHttpClient.java