mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-28 03:25:18 +03:00
Eleminate not needed toast on HTTP 304
https://github.com/square/retrofit/issues/805#issuecomment-93426183 https://stackoverflow.com/a/23244575
This commit is contained in:
parent
ce176157b6
commit
849a5a0958
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,8 @@ public class NotesClient {
|
|||
con.setRequestProperty(
|
||||
"Authorization",
|
||||
"Basic " + Base64.encodeToString((username + ":" + password).getBytes(), Base64.NO_WRAP));
|
||||
// https://github.com/square/retrofit/issues/805#issuecomment-93426183
|
||||
con.setRequestProperty( "Connection", "Close");
|
||||
con.setRequestProperty("User-Agent", "nextcloud-notes/" + BuildConfig.VERSION_NAME + " (Android)");
|
||||
if (lastETag != null && METHOD_GET.equals(method)) {
|
||||
con.setRequestProperty("If-None-Match", lastETag);
|
||||
|
|
Loading…
Reference in a new issue