{"id":54072,"library":"httpclient","title":"Apache HttpClient","description":"Apache HttpComponents Client provides a robust HTTP client library for sending requests and handling responses in Java.","status":"active","version":"4.5.14","language":"java","source_language":null,"source_url":"https://github.com/apache/httpcomponents-client","tags":["http","client","networking"],"install":[{"cmd":"<dependency>\n  <groupId>org.apache.httpcomponents</groupId>\n  <artifactId>httpclient</artifactId>\n  <version>4.5.14</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'org.apache.httpcomponents:httpclient:4.5.14'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"CloseableHttpClient","correct":"org.apache.http.impl.client.CloseableHttpClient"}],"quickstart":{"code":"import org.apache.http.impl.client.CloseableHttpClient;\nimport org.apache.http.impl.client.HttpClients;\nimport org.apache.http.client.methods.HttpGet;\nimport org.apache.http.client.methods.CloseableHttpResponse;\n\npublic class Example {\n    public static void main(String[] args) throws Exception {\n        try (CloseableHttpClient httpClient = HttpClients.createDefault()) {\n            HttpGet request = new HttpGet(\"http://example.com\");\n            try (CloseableHttpResponse response = httpClient.execute(request)) {\n                System.out.println(response.getStatusLine());\n            }\n        }\n    }\n}","lang":"java","description":"A simple HTTP GET request using Apache HttpClient."},"warnings":[{"fix":"Use org.apache.httpcomponents.client5:httpclient5 for the latest features and support.","message":"HttpClient 4.x is in maintenance mode; consider migrating to HttpClient 5.x for new projects.","severity":"breaking","affected_versions":">=4.0.0 <5.0.0"}],"env_vars":null,"search_vec":"'apach':1,3 'client':5,10,21 'handl':16 'http':9,20 'httpclient':2 'httpcompon':4 'java':19 'librari':11 'network':22 'provid':6 'request':14 'respons':17 'robust':8 'send':13","created_at":"2026-06-15T08:33:03.904962+00:00","updated_at":"2026-06-15T08:33:03.904962+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://hc.apache.org/httpcomponents-client-ga","github":"https://github.com/apache/httpcomponents-client","docs":"https://appdoc.app/artifact/org.apache.httpcomponents/httpclient/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-client","networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}