We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5adbb01 commit bb48cdcCopy full SHA for bb48cdc
src/server/sse.ts
@@ -68,15 +68,15 @@ export class SSEServerTransport implements Transport {
68
async handlePostMessage(
69
req: IncomingMessage,
70
res: ServerResponse,
71
- parsedBody?: unknown,
+ parsedBody?: {[key: string]: unknown},
72
): Promise<void> {
73
if (!this._sseResponse) {
74
const message = "SSE connection not established";
75
res.writeHead(500).end(message);
76
throw new Error(message);
77
}
78
79
- let body: string | unknown;
+ let body: string | typeof parsedBody;
80
try {
81
const ct = contentType.parse(req.headers["content-type"] ?? "");
82
if (ct.type !== "application/json") {
0 commit comments