minor fix

This commit is contained in:
Aadesh Kheria 2026-04-14 22:12:44 -07:00
parent 140ee7eb86
commit afd84bce0e

View File

@ -22,16 +22,16 @@ function getDocsToolsBaseUrl(): string {
async function postDocsToolAction(action: Record<string, unknown>): Promise<string> {
const base = getDocsToolsBaseUrl();
const res = await fetch(`${base}/api/internal/docs-tools`, {
method: "POST",
headers: {
"Content-Type": "application/json",
// MCP-style JSON-RPC endpoint requires clients to advertise both JSON and SSE.
Accept: "application/json, text/event-stream",
},
body: JSON.stringify(action),
});
try {
const res = await fetch(`${base}/api/internal/docs-tools`, {
method: "POST",
headers: {
"Content-Type": "application/json",
// MCP-style JSON-RPC endpoint requires clients to advertise both JSON and SSE.
Accept: "application/json, text/event-stream",
},
body: JSON.stringify(action),
});
if (!res.ok) {
const errBody = await res.text();