mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +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 {
|
public static class Http {
|
||||||
private static final String DELETE_METHOD = "DELETE";
|
|
||||||
private static final String GET_METHOD = "GET";
|
private static final String GET_METHOD = "GET";
|
||||||
private static final String HEAD_METHOD = "HEAD";
|
private static final String HEAD_METHOD = "HEAD";
|
||||||
private static CookieManager cookieManager;
|
private static CookieManager cookieManager;
|
||||||
@ -537,10 +536,7 @@ public class Async {
|
|||||||
connection.setInstanceFollowRedirects(false);
|
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
|
// close the opened streams (saves copy-paste implementation
|
||||||
// in each method that throws IOException)
|
// in each method that throws IOException)
|
||||||
|
Reference in New Issue
Block a user