Interface SdkHttpClient

All Superinterfaces:
AutoCloseable, SdkAutoCloseable
All Known Implementing Classes:
ApacheHttpClient, AwsCrtHttpClient, MockSyncHttpClient, SdkDefaultClientBuilder.NonManagedSdkHttpClient, UrlConnectionHttpClient

@Immutable @ThreadSafe public interface SdkHttpClient extends SdkAutoCloseable
Interface to take a representation of an HTTP request, make an HTTP call, and return a representation of an HTTP response.

Implementations MUST be thread safe.

  • Method Details

    • prepareRequest

      ExecutableHttpRequest prepareRequest(HttpExecuteRequest request)
      Create a ExecutableHttpRequest that can be used to execute the HTTP request.
      Parameters:
      request - Representation of an HTTP request.
      Returns:
      Task that can execute an HTTP request and can be aborted.
    • clientName

      default String clientName()
      Each HTTP client implementation should return a well-formed client name that allows requests to be identifiable back to the client that made the request. The client name should include the backing implementation as well as the Sync or Async to identify the transmission type of the request. Client names should only include alphanumeric characters. Examples of well formed client names include, ApacheSync, for requests using Apache's synchronous http client or NettyNioAsync for Netty's asynchronous http client.
      Returns:
      String containing the name of the client