Replies: 1 comment 2 replies
-
Currently HyperExpress only enables SSE on GET requests as it was built for Browser EventSource compatibility which only supports GET requests. I am assuming you are trying to do some sort of an unconventional POST request SSE which acts as a stream? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
`
export const index_router = new Router();
index_router.get("/sse", (request, response) => {
let i = 0;
if (response.sse) {
console.log("client got connected");
response.once("close", () => {
console.log("client got disconnected");
});
});
`
above code just works fine. But once change it to index_router.post("/sse", (request, response) => {}, error raised up says : SSE not supported.
Is it a bug or something I just missed?
Beta Was this translation helpful? Give feedback.
All reactions