Package net.snowflake.client.jdbc

## Class RestRequest

- java.lang.Object
- - net.snowflake.client.jdbc.RestRequest

    public class RestRequest
    extends Object

This is an abstraction on top of http client.

Currently it only has one method for retrying http request execution so that the same logic doesn't have to be replicated at difference places where retry is needed.

### Constructor Summary

Constructors
`RestRequest()`

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean noRetry, ExecTimeTelemetryData execTimeData)`

Deprecated.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean noRetry, ExecTimeTelemetryData execTimeData, SFBaseSession sfSession)`

Execute an HTTP request with retry logic.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean noRetry, ExecTimeTelemetryData execTimeData, RetryContextManager retryManager)`

Deprecated.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean noRetry, ExecTimeTelemetryData execTimeData, RetryContextManager retryManager, SFBaseSession sfSession, HttpClientSettingsKey key, List<HttpHeadersCustomizer> httpHeaderCustomizer, boolean isHttpClientWithoutDecompression)`

Execute an HTTP request with retry logic.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, ExecTimeTelemetryData execTimeTelemetryData)`

Deprecated.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, ExecTimeTelemetryData execTimeTelemetryData, SFBaseSession sfSession)`

Execute an HTTP request with retry logic.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, ExecTimeTelemetryData execTimeData, RetryContextManager retryContextManager)`

Deprecated.

`static org.apache.http.client.methods.CloseableHttpResponse`

`execute​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, ExecTimeTelemetryData execTimeData, RetryContextManager retryContextManager, SFBaseSession sfSession)`

Execute an HTTP request with retry logic.

`static HttpResponseContextDto`

`executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean noRetry, boolean unpackResponse, ExecTimeTelemetryData execTimeTelemetryData, SFBaseSession sfSession, HttpClientSettingsKey key, List<HttpHeadersCustomizer> httpHeaderCustomizer, boolean isHttpClientWithoutDecompression)`

Execute an HTTP request with retry logic.

`static HttpResponseContextDto`

`executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, long retryTimeout, long authTimeout, int socketTimeout, int maxRetries, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeSnowflakeHeaders, boolean retryHTTP403, boolean unpackResponse, ExecTimeTelemetryData execTimeTelemetryData, SFBaseSession sfSession, HttpClientSettingsKey key, List<HttpHeadersCustomizer> httpHeaderCustomizer, boolean isHttpClientWithoutDecompression)`

Execute an HTTP request with retry logic.

`static HttpResponseContextDto`

`executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.client.methods.HttpRequestBase httpRequest, HttpExecutingContext httpExecutingContext, ExecTimeTelemetryData execTimeData, RetryContextManager retryManager, HttpClientSettingsKey key, List<HttpHeadersCustomizer> httpHeaderCustomizer, boolean isHttpClientWithoutDecompression)`

Execute an HTTP request with retry logic.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RestRequest

    public RestRequest()

### Method Detail

#### execute

    @Deprecated
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               ExecTimeTelemetryData execTimeTelemetryData)
                                                                        throws SnowflakeSQLException

Deprecated.
Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not should be executed before and/or after the retry
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @SnowflakeJdbcInternalApi
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               ExecTimeTelemetryData execTimeTelemetryData,
                                                                               SFBaseSession sfSession)
                                                                        throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not should be executed before and/or after the retry
  `sfSession` - the session associated with the request
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @Deprecated
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               boolean noRetry,
                                                                               ExecTimeTelemetryData execTimeData)
                                                                        throws SnowflakeSQLException

Deprecated.
Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not should be executed before and/or after the retry
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @SnowflakeJdbcInternalApi
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               boolean noRetry,
                                                                               ExecTimeTelemetryData execTimeData,
                                                                               SFBaseSession sfSession)
                                                                        throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not should be executed before and/or after the retry
  `sfSession` - the session associated with the request
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @Deprecated
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               ExecTimeTelemetryData execTimeData,
                                                                               RetryContextManager retryContextManager)
                                                                        throws SnowflakeSQLException

Deprecated.
Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `execTimeData` - ExecTimeTelemetryData should be executed before and/or after the retry
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @SnowflakeJdbcInternalApi
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               ExecTimeTelemetryData execTimeData,
                                                                               RetryContextManager retryContextManager,
                                                                               SFBaseSession sfSession)
                                                                        throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `execTimeData` - ExecTimeTelemetryData should be executed before and/or after the retry
  `sfSession` - the session associated with the request
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @Deprecated
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               boolean noRetry,
                                                                               ExecTimeTelemetryData execTimeData,
                                                                               RetryContextManager retryManager)
                                                                        throws SnowflakeSQLException

Deprecated.
Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `noRetry` - should we disable retry on non-successful http resp code
  `execTimeData` - ExecTimeTelemetryData
  `retryManager` - RetryContextManager - object allowing to optionally pass custom logic that should be executed before and/or after the retry
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### execute

    @SnowflakeJdbcInternalApi
    public static org.apache.http.client.methods.CloseableHttpResponse execute​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                                               org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                                               long retryTimeout,
                                                                               long authTimeout,
                                                                               int socketTimeout,
                                                                               int maxRetries,
                                                                               int injectSocketTimeout,
                                                                               AtomicBoolean canceling,
                                                                               boolean withoutCookies,
                                                                               boolean includeRetryParameters,
                                                                               boolean includeSnowflakeHeaders,
                                                                               boolean retryHTTP403,
                                                                               boolean noRetry,
                                                                               ExecTimeTelemetryData execTimeData,
                                                                               RetryContextManager retryManager,
                                                                               SFBaseSession sfSession,
                                                                               HttpClientSettingsKey key,
                                                                               List<HttpHeadersCustomizer> httpHeaderCustomizer,
                                                                               boolean isHttpClientWithoutDecompression)
                                                                        throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `noRetry` - should we disable retry on non-successful http resp code
  `execTimeData` - ExecTimeTelemetryData
  `retryManager` - RetryContextManager - object allowing to optionally pass custom logic that should be executed before and/or after the retry
  `sfSession` - the session associated with the request
  `key` - HttpClientSettingsKey object
  `httpHeaderCustomizer` - HttpHeadersCustomizer object for customization of HTTP headers for requests sent by the Snowflake JDBC driver.
  `isHttpClientWithoutDecompression` - flag for create client without Decompression
Returns:
  HttpResponse Object get from server
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### executeWithRetries

    @SnowflakeJdbcInternalApi
    public static HttpResponseContextDto executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                            org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                            long retryTimeout,
                                                            long authTimeout,
                                                            int socketTimeout,
                                                            int maxRetries,
                                                            int injectSocketTimeout,
                                                            AtomicBoolean canceling,
                                                            boolean withoutCookies,
                                                            boolean includeRetryParameters,
                                                            boolean includeSnowflakeHeaders,
                                                            boolean retryHTTP403,
                                                            boolean unpackResponse,
                                                            ExecTimeTelemetryData execTimeTelemetryData,
                                                            SFBaseSession sfSession,
                                                            HttpClientSettingsKey key,
                                                            List<HttpHeadersCustomizer> httpHeaderCustomizer,
                                                            boolean isHttpClientWithoutDecompression)
                                                     throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `sfSession` - the session associated with the request
Returns:
  HttpResponseContextDto Object get from server or exception
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### executeWithRetries

    @SnowflakeJdbcInternalApi
    public static HttpResponseContextDto executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                            org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                            long retryTimeout,
                                                            long authTimeout,
                                                            int socketTimeout,
                                                            int maxRetries,
                                                            int injectSocketTimeout,
                                                            AtomicBoolean canceling,
                                                            boolean withoutCookies,
                                                            boolean includeRetryParameters,
                                                            boolean includeSnowflakeHeaders,
                                                            boolean retryHTTP403,
                                                            boolean noRetry,
                                                            boolean unpackResponse,
                                                            ExecTimeTelemetryData execTimeTelemetryData,
                                                            SFBaseSession sfSession,
                                                            HttpClientSettingsKey key,
                                                            List<HttpHeadersCustomizer> httpHeaderCustomizer,
                                                            boolean isHttpClientWithoutDecompression)
                                                     throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `retryTimeout` - : retry timeout (in seconds)
  `authTimeout` - : authenticator specific timeout (in seconds)
  `socketTimeout` - : curl timeout (in ms)
  `maxRetries` - : max retry count for the request
  `injectSocketTimeout` - : simulate socket timeout
  `canceling` - canceling flag
  `withoutCookies` - whether the cookie spec should be set to IGNORE or not
  `includeRetryParameters` - whether to include retry parameters in retried requests. Only needs to be true for JDBC statement execution (query requests to Snowflake server).
  `includeSnowflakeHeaders` - whether to include Snowflake headers (incl. request_guid)
  `retryHTTP403` - whether to retry on HTTP 403 or not
  `execTimeTelemetryData` - ExecTimeTelemetryData should be executed before and/or after the retry
  `sfSession` - the session associated with the request
Returns:
  HttpResponseContextDto Object get from server or exception
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc

#### executeWithRetries

    @SnowflakeJdbcInternalApi
    public static HttpResponseContextDto executeWithRetries​(org.apache.http.impl.client.CloseableHttpClient httpClient,
                                                            org.apache.http.client.methods.HttpRequestBase httpRequest,
                                                            HttpExecutingContext httpExecutingContext,
                                                            ExecTimeTelemetryData execTimeData,
                                                            RetryContextManager retryManager,
                                                            HttpClientSettingsKey key,
                                                            List<HttpHeadersCustomizer> httpHeaderCustomizer,
                                                            boolean isHttpClientWithoutDecompression)
                                                     throws SnowflakeSQLException

Execute an HTTP request with retry logic.

Parameters:
  `httpClient` - client object used to communicate with other machine
  `httpRequest` - request object contains all the request information
  `execTimeData` - ExecTimeTelemetryData should be executed before and/or after the retry
  `retryManager` - RetryManager containing extra actions used during retries
Returns:
  HttpResponseContextDto Object get from server or exception
Throws:
  `SnowflakeSQLException` - Request timeout Exception or Illegal State Exception i.e. connection is already shutdown etc