Skip to content

Commit 73cce2c

Browse files
committed
minor tweak
1 parent 4ae16e0 commit 73cce2c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

fern/sdk/mcp-server.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,11 @@ async function main() {
168168
Authorization: `Bearer ${process.env.VAPI_TOKEN}`,
169169
};
170170
const options = {
171-
requestInit: { headers: headers },
172171
eventSourceInit: {
173-
fetch: (url, init) => {
174-
return fetch(url, {
175-
...(init || {}),
176-
headers: {
177-
...(init?.headers || {}),
178-
...headers,
179-
},
180-
});
181-
},
172+
fetch: (url, init) => fetch(url, { ...init, headers }),
173+
},
174+
requestInit: {
175+
headers,
182176
},
183177
};
184178
const transport = new SSEClientTransport(new URL(serverUrl), options);

0 commit comments

Comments
 (0)