We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8f9e1b commit 92174b4Copy full SHA for 92174b4
1 file changed
src/resend.ts
@@ -107,13 +107,15 @@ export class Resend {
107
entity?: unknown,
108
options: PostOptions & IdempotentRequest = {},
109
) {
110
+ const headers = new Headers(this.headers);
111
+
112
if (options.idempotencyKey) {
- this.headers.set('Idempotency-Key', options.idempotencyKey);
113
+ headers.set('Idempotency-Key', options.idempotencyKey);
114
}
115
116
const requestOptions = {
117
method: 'POST',
- headers: this.headers,
118
+ headers: headers,
119
body: JSON.stringify(entity),
120
...options,
121
};
0 commit comments