HttpClient deprecated, and URIBuilder not coming up?

243 Views Asked by At
@Override
        protected Void doInBackground(Void... params) {
        ArrayList<Pair> dataToSend = new ArrayList<>();
        dataToSend.add(new Pair("name", user.name));
        dataToSend.add(new Pair("username", user.username));
        dataToSend.add(new Pair("age", user.age));
        dataToSend.add(new Pair("password", user.password));

        URIBuilder builder = //
        HttpParams httpRequestParams = new BasicHttpParams();
        return null;
    }
1

There are 1 best solutions below

1
On

In your project's src/build.gradle

add this line

 dependencies {
     compile 'org.apache.httpcomponents:httpclient:4.0-alpha4'
  }

and now synchronise your project and also build your project.