diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java index 70850e6c95..f843df4332 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java @@ -188,21 +188,6 @@ public void setRequestBody(PluginCall call, JSValue body) throws JSONException, dataString = call.getString("data"); } this.writeRequestBody(dataString != null ? dataString : ""); - } else if (contentType.contains("application/x-www-form-urlencoded")) { - StringBuilder builder = new StringBuilder(); - - JSObject obj = body.toJSObject(); - Iterator keys = obj.keys(); - while (keys.hasNext()) { - String key = keys.next(); - Object d = obj.get(key); - builder.append(key).append("=").append(URLEncoder.encode(d.toString(), "UTF-8")); - - if (keys.hasNext()) { - builder.append("&"); - } - } - this.writeRequestBody(builder.toString()); } else { this.writeRequestBody(body.toString()); }