HttpClient Examples (Async)

This example demonstrates handling of HTTP/2 message exchanges pushed by the server.

  • Client authentication

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

  • Custom SSL context

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

  • Connection / TLS configuation per route / host

    This example demonstrates how to use connection configuration on a per-route or a per-host basis.

  • Connection eviction

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

  • Preemptive BASIC authentication

    This example shows how HttpClient can be customized to authenticate preemptively using BASIC scheme. Generally, preemptive authentication can be considered less secure than a response to an authentication challenge and therefore discouraged.