From 2b514addb21c2f3710e40a79fd4fdf8263d4468e Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 1 Aug 2022 10:19:59 +0100 Subject: [PATCH] android 0.15: Allow method/body/headers to be specified for `http` (needs Gadgetbridge 0.68.0b or later) --- apps/android/ChangeLog | 3 ++- apps/android/boot.js | 3 +++ apps/android/metadata.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/android/ChangeLog b/apps/android/ChangeLog index 76658af49..0cc7aedd4 100644 --- a/apps/android/ChangeLog +++ b/apps/android/ChangeLog @@ -11,4 +11,5 @@ 0.10: Fix SMS bug 0.12: Use default Bangle formatter for booleans 0.13: Added Bangle.http function (see Readme file for more info) -0.14: Fix timeout of http function not beeing cleaned up +0.14: Fix timeout of http function not being cleaned up +0.15: Allow method/body/headers to be specified for `http` (needs Gadgetbridge 0.68.0b or later) diff --git a/apps/android/boot.js b/apps/android/boot.js index 99d4dbb2c..bc8e3032d 100644 --- a/apps/android/boot.js +++ b/apps/android/boot.js @@ -150,6 +150,9 @@ //send the request var req = {t: "http", url:url, id:options.id}; if (options.xpath) req.xpath = options.xpath; + if (options.method) req.method = options.method; + if (options.body) req.body = options.body; + if (options.headers) req.headers = options.headers; gbSend(req); //create the promise var promise = new Promise(function(resolve,reject) { diff --git a/apps/android/metadata.json b/apps/android/metadata.json index 91f74c36f..5d1b2f561 100644 --- a/apps/android/metadata.json +++ b/apps/android/metadata.json @@ -2,7 +2,7 @@ "id": "android", "name": "Android Integration", "shortName": "Android", - "version": "0.14", + "version": "0.15", "description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.", "icon": "app.png", "tags": "tool,system,messages,notifications,gadgetbridge",