aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet/http.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wallet/http.ts')
-rw-r--r--lib/wallet/http.ts13
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,