We release a new app and we found that http call from inside the app to our server doesn't work. Is Clover station blocking all outgoing HTTP request other than to Clover server? (HTTP call to Clover API is ok)
We release a new app and we found that http call from inside the app to our server doesn't work. Is Clover station blocking all outgoing HTTP request other than to Clover server? (HTTP call to Clover API is ok)
Hi,
This is working fine for me on both Sandbox and Prod on Station.
public void makeHttpRequest(View view) {
new AsyncTask<Void, Void, Response>() {
protected final Response doInBackground(Void... params) {
String url = "https://www.google.com";
Request request = new Request.Builder()
.url(url)
.build();
Response response = null;
try {
response = mClient.newCall(request).execute();
} catch (Exception e) {
e.printStackTrace();
}
if (response != null) {
return response;
}
return null;
}
protected void onPostExecute(Response response) {
if (response.isSuccessful()) {
Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getApplicationContext(), "Fail", Toast.LENGTH_LONG).show();
}
}
}.execute();
}
Hmm weird... Ok could be my network environment problem or something else. Thanks!!
3 People are following this question.