From a125002ed836e78e26f9ecb4f5ab663dd2ce655b Mon Sep 17 00:00:00 2001 From: Zsombor Margetan Date: Tue, 11 Apr 2023 11:50:52 +0200 Subject: [PATCH] feat(readme): extend readme with a retry section EME-6117 Co-authored-by: Benjamin Gehl Co-authored-by: Zoltan Kiss --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 02d5bb9..27e2b0c 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,16 @@ const heroes = await request.post<{ name: string; }[]>('/heroes', { }); console.log(heroes); ``` + +### Retry + +You can specify an optional retry config in the constructor of the EscherRequestOption's second parameter: +```typescript +const options = new EscherRequestOption('example.host.com', { + credentialScope: 'eu/service/ems_request', + retryConfig: { + retries: 5 + } +}); +``` +The type of the `retryConfig` property is `IAxiosRetryConfig`, you can find the detailed list of available parameters here: https://github.com/softonic/axios-retry#options