mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
minor fix
This commit is contained in:
parent
140ee7eb86
commit
afd84bce0e
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user