I want to implement a class that will handle all the HTTP requests of my application, which will be basically:
- Get a business list (GET);
- Login (POST);
- Update Location (POST).
So, I will need to get the result string from the server (JSON) and pass it to other response processing methods.
I currently have the following methods:
public class Get extends AsyncTask<Void, Void, String> { @Override protected String doInBackground(Void... arg) { String linha = ""; String retorno = ""; mDialog = ProgressDialog.show(mContext, "Aguarde", "Carregando...", true);
But g.get() returns an empty answer. How can i fix this?
source share