org.apache.hc.client5.http.impl.classic

## Class MinimalHttpClient

- java.lang.Object
- - org.apache.hc.client5.http.impl.classic.CloseableHttpClient
  - - org.apache.hc.client5.http.impl.classic.MinimalHttpClient

- All Implemented Interfaces:
    Closeable, AutoCloseable, HttpClient, ModalCloseable

      @Contract(threading=SAFE_CONDITIONAL)
      public class MinimalHttpClient
      extends CloseableHttpClient

  Minimal implementation of `CloseableHttpClient`. This client is optimized for HTTP/1.1 message transport and does not support advanced HTTP protocol functionality such as request execution via a proxy, state management, authentication and request redirects.

  Concurrent message exchanges executed by this client will get assigned to separate connections leased from the connection pool.

  Since:
    4.3

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `close(CloseMode closeMode)`
    `protected CloseableHttpResponse` | `doExecute(HttpHost target, ClassicHttpRequest request, HttpContext context)`

    - ### Methods inherited from class org.apache.hc.client5.http.impl.classic.CloseableHttpClient

      `execute, execute, execute, execute, execute, execute, execute, execute`

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

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

    - ### Methods inherited from interface org.apache.hc.client5.http.classic.HttpClient

      `executeOpen`

- - ### Method Detail

    - #### doExecute

          protected CloseableHttpResponse doExecute(HttpHost target,
                                                    ClassicHttpRequest request,
                                                    HttpContext context)
                                             throws IOException

      Specified by:
        `doExecute` in class `CloseableHttpClient`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Throws:
        `IOException`

    - #### close

          public void close(CloseMode closeMode)

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.