I've implemented these classes, but I can not import them; the project was done in Android Studio.
public class HttpConnection {
public static String getSetDataWeb(WrapData wd){
HttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(wd.getUrl());
String answer = "";
try{
ArrayList<NameValuePair> valores = new ArrayList<NameValuePair>();
valores.add(new BasicNameValuePair("method", wd.getMethod()));
valores.add(new BasicNameValuePair("produto", wd.getProduto()));
valores.add(new BasicNameValuePair("marca", wd.getMarca()));
valores.add(new BasicNameValuePair("detalhe", wd.getDetalhe()));
valores.add(new BasicNameValuePair("img-mime", wd.getImage().getMime()));
valores.add(new BasicNameValuePair("img-image", wd.getImage().getBitmapBase64()));
httpPost.setEntity(new UrlEncodedFormEntity(valores));
HttpResponse resposta = httpClient.execute(httpPost);
answer = EntityUtils.toString(resposta.getEntity());
}
catch (UnsupportedEncodingException e) { e.printStackTrace(); }
catch (ClientProtocolException e) { e.printStackTrace(); }
catch (IOException e) { e.printStackTrace(); }
return(answer);
}
}