Log API requests as verbose, not warning.

This commit is contained in:
Felix Ableitner 2015-05-17 23:03:45 +02:00
parent 1e2c4196a8
commit 91bd271302
2 changed files with 5 additions and 3 deletions

View File

@ -56,9 +56,11 @@ public class GetTask extends AsyncTask<String, Void, String> {
*/
@Override
protected String doInBackground(String... params) {
String fullUri = params[0] + params[1];
Log.v(TAG, "Calling Rest API at " + fullUri);
// Retry at most 10 times before failing
for (int i = 0; i < 10; i++) {
String fullUri = params[0] + params[1];
HttpClient httpclient = Https.createHttpsClient(mHttpsCertPath);
if (params.length == 5) {
LinkedList<NameValuePair> urlParams = new LinkedList<>();
@ -72,8 +74,6 @@ public class GetTask extends AsyncTask<String, Void, String> {
return null;
try {
Log.w(TAG, "Calling Rest API at " + fullUri);
HttpResponse response = httpclient.execute(get);
HttpEntity entity = response.getEntity();

View File

@ -39,6 +39,8 @@ public class PostTask extends AsyncTask<String, Void, Boolean> {
@Override
protected Boolean doInBackground(String... params) {
String fullUri = params[0] + params[1];
Log.v(TAG, "Calling Rest API at " + fullUri);
HttpClient httpclient = Https.createHttpsClient(mHttpsCertPath);
HttpPost post = new HttpPost(fullUri);
post.addHeader(new BasicHeader(RestApi.HEADER_API_KEY, params[2]));