summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-android/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-android/src/index.ts')
-rw-r--r--packages/taler-wallet-android/src/index.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/taler-wallet-android/src/index.ts b/packages/taler-wallet-android/src/index.ts
index 07d15d584..bfda8ab71 100644
--- a/packages/taler-wallet-android/src/index.ts
+++ b/packages/taler-wallet-android/src/index.ts
@@ -38,6 +38,8 @@ import {
WalletNotification,
WALLET_EXCHANGE_PROTOCOL_VERSION,
WALLET_MERCHANT_PROTOCOL_VERSION,
+ bytesToString,
+ stringToBytes,
} from "taler-wallet-core";
import fs from "fs";
@@ -57,6 +59,10 @@ export class AndroidHttpLib implements HttpRequestLibrary {
constructor(private sendMessage: (m: string) => void) {}
+ fetch(url: string, opt?: HttpRequestOptions): Promise<HttpResponse> {
+ return this.nodeHttpLib.fetch(url, opt);
+ }
+
get(url: string, opt?: HttpRequestOptions): Promise<HttpResponse> {
if (this.useNfcTunnel) {
const myId = this.requestId++;
@@ -120,6 +126,7 @@ export class AndroidHttpLib implements HttpRequestLibrary {
requestMethod: "FIXME",
json: async () => JSON.parse(msg.responseText),
text: async () => msg.responseText,
+ bytes: async () => { throw Error("bytes() not supported for tunnel response") },
};
p.resolve(resp);
} else {