Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 21, 2024
1 parent fcdced1 commit 2c534e5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions apps/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
```

Expand Down

0 comments on commit 2c534e5

Please sign in to comment.