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

defaultRequestConfig never used in InternalHttpClient

    XMLWordPrintableJSON

Details

    Description

      after initializing builder en building client, the timeout settings are not used for the request execution. In ClosableHttpClient.doExecute(), an on the fly request config is used.

      my code:

      builder = HttpClientBuilder.create();
      int timeout = 30000;
      defaultRequestConfig = RequestConfig.custom()
      .setSocketTimeout(timeout)
      .setConnectTimeout(timeout)
      .build();
      builder.setDefaultRequestConfig(defaultRequestConfig);
      List<Header> headers = new ArrayList<Header>();
      headers.add(new BasicHeader("Accept", "application/json"));
      builder.setDefaultHeaders(headers);
      builder.useSystemProperties();
      client = builder.build();
      client.execute(request)

      timeout settings are never used!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              robsmit Rob Smit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: