diff options
author | Florian Dold <florian@dold.me> | 2022-03-28 20:23:47 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-28 20:24:09 +0200 |
commit | 24b71107765172b568803fad5fb79474674b147a (patch) | |
tree | efb49aebb32fdaeb7e9d4ab3e724b62d0ce2bb93 /packages/taler-wallet-core/src/util | |
parent | e5f21ec5bbcb74028c7e49521b19af9437489190 (diff) | |
download | wallet-core-24b71107765172b568803fad5fb79474674b147a.tar.xz |
vendor CancellationToken
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/http.ts | 12 |
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; } |