mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 10:01:08 +08:00
fix(ui-mobile-base): Android http request body was not sent if method was DELETE (#9887)
This commit is contained in:

committed by
Nathan Walker

parent
cd5d2c2f4d
commit
57e4973da5
@ -285,7 +285,6 @@ public class Async {
|
||||
}
|
||||
|
||||
public static class Http {
|
||||
private static final String DELETE_METHOD = "DELETE";
|
||||
private static final String GET_METHOD = "GET";
|
||||
private static final String HEAD_METHOD = "HEAD";
|
||||
private static CookieManager cookieManager;
|
||||
@ -537,10 +536,7 @@ public class Async {
|
||||
connection.setInstanceFollowRedirects(false);
|
||||
}
|
||||
|
||||
// Do not attempt to write the content (body) for DELETE method, Java will throw directly
|
||||
if (!requestMethod.equals(DELETE_METHOD)) {
|
||||
options.writeContent(connection, openedStreams);
|
||||
}
|
||||
options.writeContent(connection, openedStreams);
|
||||
|
||||
// close the opened streams (saves copy-paste implementation
|
||||
// in each method that throws IOException)
|
||||
|
Reference in New Issue
Block a user