diff options
author | Florian Dold <florian@dold.me> | 2020-12-02 14:55:04 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-02 14:55:04 +0100 |
commit | 89f1a281fea66b986fc0a003dc10446f6ed6e4a2 (patch) | |
tree | 8ffe90d572bc6967ee86bdcffc1eb6dc1240d17c /packages/taler-wallet-android | |
parent | 0828e65f8845dc4b148c0d3b0697fb589b338239 (diff) | |
download | wallet-core-89f1a281fea66b986fc0a003dc10446f6ed6e4a2.tar.xz |
backup WIP
Diffstat (limited to 'packages/taler-wallet-android')
-rw-r--r-- | packages/taler-wallet-android/src/index.ts | 7 |
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 { |