Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP API deprected warnings UTF_8, Scheme, ThreadSafeClientConnManager

Tags:

java

http

I'm new java. I created a java project to call my webservice(Servlet,Tomcat6.0).
To use http i had added the following jar files
1. httpclient-4.2.1
2. httpcore-4.2.1

For methods(In Bold) below i'm getting type deprecated warnings and not able to run the project.

HTTP.**UTF_8**
aSchemeRegistryL.register(new **Scheme**("http", PlainSocketFactory.getSocketFactory(), 80));
ClientConnectionManager ccm = new **ThreadSafeClientConnManager**(aHttpParamsL, aSchemeRegistryL);    

Help me to rectify it.

like image 319
Vignesh Avatar asked Aug 13 '12 13:08

Vignesh


1 Answers

For HTTP.UTF_8 the alternative is Consts.UTF_8. It's weird they don't mention that in the docs...

like image 73
Anton Avatar answered Nov 15 '22 04:11

Anton