diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
-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; } |