From 2c534e5a441ff4eecc0facafbd112458e196d86e Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 21 Oct 2024 10:34:38 +0100 Subject: [PATCH] docs --- apps/android/README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/android/README.md b/apps/android/README.md index f322e6a4e6..a7a539e381 100644 --- a/apps/android/README.md +++ b/apps/android/README.md @@ -49,11 +49,21 @@ The boot code also provides some useful functions: * `body` the body of the HTTP request * `headers` an object of headers, eg `{HeaderOne : "headercontents"}` +`Bangle.http` returns a promise which contains: + +```JS +{ + t:"http", + id: // the ID of this HTTP request + resp: "...." // a string containing the response +} +``` + eg: -``` +```JS Bangle.http("https://pur3.co.uk/hello.txt").then(data=>{ - console.log("Got ",data); + console.log("Got ",data.resp); }); ```