HttpAsyncClient Examples

  • Asynchronous HTTP exchange

    This example demonstrates a basic asynchronous HTTP request / response exchange. Response content is buffered in memory for simplicity.

  • Event based content streaming

    This example demonstrates an asynchronous HTTP request / response exchange with a full content streaming.

  • Concurrent asynchronous HTTP exchanges

    This example demonstrates a fully asynchronous execution of multiple HTTP exchanges where the result of an individual operation is reported using a callback interface.

  • Asynchronous request via a proxy

    This example demonstrates how to send an HTTP request via a proxy.

  • HttpAsyncClient configuration

    This example demonstrates how to customize and configure the most common aspects of HTTP request execution and connection management.

  • Custom execution context

    This example demonstrates the use of a local execution context with custom context settings.

  • Client authentication

    This example demonstrates execution of an HTTP request against a target site that requires user authentication.

  • Proxy authentication

    This example shows execution of an HTTP request over a secure connection tunneled through an authenticating proxy.

  • Custom SSL context

    This example demonstrates how to create secure connections with a custom SSL context.

  • Zero copy file upload / download

    This example demonstrates how HttpAsyncClient can be used to upload or download files without creating an intermediate content buffer in memory (zero copy file transfer).

  • Connection eviction

    This example demonstrates how to evict expired and idle connections from the connection pool.