We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8476b08 commit 81d8479Copy full SHA for 81d8479
plugin/platforms/android/java/com/nativescript/https/OkHttpResponse.java
@@ -457,7 +457,18 @@ public void run() {
457
public static int getStatusCode(Response response) {
458
return response.code();
459
}
460
+
461
public static String getMessage(Response response) {
462
return response.message();
463
464
465
+ public static String getHeaders(Response response) throws Exception {
466
+ JSONObject obj = new JSONObject();
467
+ Headers headers = response.headers();
468
+ for (int i = 0; i < headers.size(); i++)
469
+ {
470
+ obj.put(headers.name(i), headers.value(i));
471
+ }
472
+ return obj.toString();
473
474
0 commit comments