okhttp 3+ post json data
I used compile ‘com.squareup.okhttp3:okhttp:3.5.0’ private class CheckUserExist extends AsyncTask<String, String, Void> { String responseString; @Override protected void onPreExecute() { super.onPreExecute(); progressDialog = new ProgressDialog(LoginActivity.this); progressDialog.setCancelable(false); progressDialog.setMessage(“Checking….”); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); progressDialog.show(); } @Override protected Void doInBackground(String… str) { MediaType JSON = MediaType.parse(“application/json; charset=utf-8”); Map<String, String> params = new HashMap<String, String>(); params.put(“ContactNo”, str[0]); // params.put(“name”, “your name”); JSONObject parameter… Continue reading okhttp 3+ post json data