mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 11:21:29 +00:00
Log API requests as verbose, not warning.
This commit is contained in:
parent
1e2c4196a8
commit
91bd271302
2 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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]));
|
||||
|
|
Loading…
Reference in a new issue