Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

DefaultHttpClient is depricated in AEM-6.4


Level 4

Dear All,

I am following the below help document for displaying data from a Restful Web Service.

Creating an Adobe Experience Manager 6.4 HTL Component that displays data from a Restful Web Service

But when I am writing the code for , then I am getting deprecated message , as shown below.


I am using AEM-6.4. Am I missing something ?

0 Replies


Community Advisor


Please check the dependency at http://localhost:4502/system/console/depfinder 

and include in pom, for 6.4 I found below:








Community Advisor

Hi Sunitha

  Please check this blog  . This talks about the same issue. I also tried the same. You can rewrite the code like below

HttpClient client = HttpClientBuilder.create().build(); 

HttpGet getRequest = new HttpGet(""+code);

getRequest.addHeader("accept", "application/json");

HttpResponse response = client.execute(getRequest);

PS:- I have not executed the code. But guess this should work from little bit of googling Happy coding .




Employee Advisor

I just checked (AEM 6.5, but 6.4 should be very similar), and there is a bundle "org.apache.httpcomponents.httpclient", which exports the java namespaces "org.apache.http.{auth,client,conn, impl}". You should be able to adapt your code to fix this deprecation easily.

(If it's working can you raise a ticket with Adobe support and ask if this example can be adapted? Thanks!)