0

So as part of a project I need to use Apache and JSON to send a receive data from a localhost database, from looking around on the internet many say to use these imports shown below, but Android Studio doesn't recognise them as imports, have they been deprecated and if so which imports should I use to carry out the same task?

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
GTucker
  • 162
  • 1
  • 2
  • 12
  • yes they are deprecated in current android versions, and but i used them very much, go for other new methods like HttpURLConnection. – Androider Dec 03 '15 at 19:10
  • Is there an import for all of the deprecated ones using HttpURLConnection or will I have to find new methods to run my code? Would it be worth showing the code I found that I'd need to edit to be compatible or not? – GTucker Dec 03 '15 at 19:14
  • HttpURLConnection is the new and useful than apache Classes like HttpClient, HttprResponse and etc. please search on google – Androider Dec 03 '15 at 19:18

0 Answers0