diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-13 08:16:12 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-13 08:16:52 +0100 |
commit | b2128609ac8159a14224deba399144b3400c8c20 (patch) | |
tree | 4759dfda67c54f6838c3aef0951545ae18bb83bd /lib/wallet/http.ts | |
parent | 3f0ee289c4a61991d0e75906a9bd949cebb39d20 (diff) | |
download | wallet-core-b2128609ac8159a14224deba399144b3400c8c20.tar.xz |
Finally give in and use React, minor tweeks.
Preact (a minimalistic React alternative) had too many bugs ...
Diffstat (limited to 'lib/wallet/http.ts')
-rw-r--r-- | lib/wallet/http.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/wallet/http.ts b/lib/wallet/http.ts index 8f82ceaff..1d22c4eb2 100644 --- a/lib/wallet/http.ts +++ b/lib/wallet/http.ts @@ -29,6 +29,19 @@ export interface HttpResponse { } +export interface HttpRequestLibrary { + req(method: string, + url: string | uri.URI, + options?: any): Promise<HttpResponse>; + + get(url: string | uri.URI): Promise<HttpResponse>; + + postJson(url: string | uri.URI, body: any): Promise<HttpResponse>; + + postForm(url: string | uri.URI, form: any): Promise<HttpResponse>; +} + + export class BrowserHttpLib { req(method: string, url: string|uri.URI, |