summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-28 20:23:47 +0200
committerFlorian Dold <florian@dold.me>2022-03-28 20:24:09 +0200
commit24b71107765172b568803fad5fb79474674b147a (patch)
treeefb49aebb32fdaeb7e9d4ab3e724b62d0ce2bb93 /packages/taler-wallet-core/src
parente5f21ec5bbcb74028c7e49521b19af9437489190 (diff)
downloadwallet-core-24b71107765172b568803fad5fb79474674b147a.tar.gz
wallet-core-24b71107765172b568803fad5fb79474674b147a.tar.bz2
wallet-core-24b71107765172b568803fad5fb79474674b147a.zip
vendor CancellationToken
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r--packages/taler-wallet-core/src/util/http.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/util/http.ts b/packages/taler-wallet-core/src/util/http.ts
index 31e38b609..9ccd560d9 100644
--- a/packages/taler-wallet-core/src/util/http.ts
+++ b/packages/taler-wallet-core/src/util/http.ts
@@ -31,6 +31,7 @@ import {
TalerErrorDetail,
Codec,
j2s,
+ CancellationToken,
} from "@gnu-taler/taler-util";
import { TalerErrorCode } from "@gnu-taler/taler-util";
import { makeErrorDetail, TalerError } from "../errors.js";
@@ -53,7 +54,18 @@ export interface HttpResponse {
export interface HttpRequestOptions {
method?: "POST" | "PUT" | "GET";
headers?: { [name: string]: string };
+
+ /**
+ * Timeout after which the request should be aborted.
+ */
timeout?: Duration;
+
+ /**
+ * Cancellation token that should abort the request when
+ * cancelled.
+ */
+ cancellationToken?: CancellationToken;
+
body?: string | ArrayBuffer | ArrayBufferView;
}