Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2169

Support to provide complete request/call timeout option

    XMLWordPrintableJSON

Details

    Description

      Description

      The httpclient (both sync and sync) supports `connectTimeout`, `responseTimeout` and `connectionRequestTimeout`. But it doesn't support complete request or call timeout similar to okhttp `callTimeout` (https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/-builder/call-timeout/). Based on my understanding the `responseTimeout` is nothing but `readTimeout` i.e. the maximum time the client will wait for a message to arrive and theoretically, the total call time can be infinite if the server keeps sending msg within specified `readTimeout`. It can be problematic if the client wants to put a hard limit on the complete call time. I believe it's a very common use case in a low latency system.

      Proposed Solution
      Provide option to user to specify `callTimeout`/`requestTimeout`

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              onlynishant Nishant Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: