about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-06-06 10:10:44 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-06-06 10:10:44 +0300
commit0ce78cba0c61a76a085c59d5038491c73ba6e2ec (patch)
treed807379a7ce0d06a4a57e4e55012e36daf3c81f0
parentb43f176da51cde4b7e0e4e53341b39492a522bc5 (diff)
downloadtt-rss-android-0ce78cba0c61a76a085c59d5038491c73ba6e2ec.tar.gz
tt-rss-android-0ce78cba0c61a76a085c59d5038491c73ba6e2ec.tar.xz
terrible hack: drop op & method from bodyparams in v2 client
-rw-r--r--org.fox.ttrss/src/main/java/org/fox/ttrss/ApiV2Client.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiV2Client.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiV2Client.java
index d424d98f..e649a1ec 100644
--- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiV2Client.java
+++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ApiV2Client.java
@@ -181,6 +181,12 @@ public class ApiV2Client {
             // Build request body (for POST/PATCH/DELETE with body params)
             RequestBody requestBody = null;
             if (bodyParams != null && !bodyParams.isEmpty()) {
+
+                // This uses different notation in V1 api so we can't remove those at the source just yet and keep
+                // compatibility, for now just drop them here (our route should be specified with URL path)
+                bodyParams.remove("op");
+                bodyParams.remove("method");
+
                 // Use form-encoded body for v2 API
                 FormBody.Builder formBuilder = new FormBody.Builder();
                 for (Map.Entry<String, String> entry : bodyParams.entrySet()) {