Lusito / Lusito/react-nano

Question/Feature Request: Is There a Way to Use POST Method with useEventSource?

Open
#4 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
41
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hi there,

First of all, thank you for building this fantastic library!

I wanted to ask if there is a way to use the POST method with useEventSource? I’m working on a project where I need to send a payload to the server as part of the SSE connection, but as far as I know, the native EventSource API only supports GET requests. This is a bit limiting for my use case, as I need to send data through POST.

If the library doesn’t currently support POST requests, I’d like to suggest adding this feature. It would be incredibly useful to have the ability to specify the HTTP method (GET or POST) and include a request body when establishing the SSE connection.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names the useEventSource entry point and the native EventSource API; start by locating how the hook establishes its current connection. No implementation files or tests are identified, so first clarify the supported POST and request-body behavior. Done means the API is defined, implemented, and verified for the requested connection mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.