@@ -3,10 +3,13 @@ title: Configure Idempotency Headers
33description : SDKs that safely support retrying requests
44---
55
6- <Markdown src = " /snippets/pro-callout.mdx" />
6+ For endpoints you've configured as idempotent, Fern's SDKs allow you to
7+ specify idempotency headers. Typically the headers include ` Idempotency-Key ` ,
8+ but you can also specify additional headers.
79
8- For any idempotent endpoints, Fern's SDKs will allow you to specify idempotency headers.
9- Typically the headers include ` Idempotency-Key ` , but you can also specify additional headers.
10+ ## How it works for SDK users
11+
12+ Your SDK users can specify an idempotency header like this:
1013
1114<CodeBlocks >
1215 <CodeBlock title = " TypeScript" >
@@ -55,15 +58,17 @@ Typically the headers include `Idempotency-Key`, but you can also specify additi
5558 </CodeBlock >
5659</CodeBlocks >
5760
58- Note that the generated SDKs will not allow you to specify idempotency headers
61+ <Note >
62+ The generated SDKs will not allow users to specify idempotency headers
5963for non-idempotent endpoints. This is to ensure that the user knows exactly
6064which invocations are idempotent and which are not.
65+ </Note >
6166
62- ### Configuration
67+ ## Configuring idempotency headers
6368
64- To enable idempotency headers in your API, you need to do the following in your overrides file:
69+ To set up idempotency headers in your API, you need to do the following in your ` overrides ` file:
65701 . Configure the idempotency headers
66- 2 . Mark individual endpoints as idempotent
71+ 1 . Mark individual endpoints as idempotent
6772
6873<Tabs >
6974 <Tab title = " OpenAPI" >
@@ -97,7 +102,7 @@ To enable idempotency headers in your API, you need to do the following in your
97102 Idempotency-Expiration : integer
98103 ` ` `
99104 </CodeBlock>
100- <CodeBlock title="openapi-overrides .yml">
105+ <CodeBlock title="service .yml">
101106 ` ` ` yaml
102107 # Mark an individual endpoint as idempotent
103108 endpoints :
0 commit comments