-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please support events without event names #14
Comments
@yoshuawuyts ☝️ |
Hmm, I didn't expect people to wanr to send messages without an event name, but I guess that's proven to be overly limiting. I think the first option would be the most straightforward; issuing a semver major seems fine for this as well. Though I wonder: if we make the argument |
For short messages,
That's a good idea, and it'd be much easier for people to use. It would not technically be a breaking change by the normal compatibility rules, but it could potentially break code that was relying on inference. I think it'd still be a good idea to do a major version bump for it, but most people should just be able to recompile their code. I'll implement that. |
Fixed in #15 |
released in v5.0.0 — I think it should be possible to use a patch.crates-io to use this with tide 0.15, but I haven't confirmed that. If not, tide bump will probably wait for next tide minor |
ref: http-rs/tide#760 |
The server-sent events standard does not require the
event
field. I'd like to be able to send events with noevent
field.I can think of several possible ways to do this:
send
method to take anOption<&str>
. This would be the simplest to implement, but would necessitate a major version bump, and would require passingSome("name")
when providing an event name, which may be inconvenient for the common case.Option<&str>
, and keep the existing method as a convenience wrapper.I'd be happy to provide the implementation. Which approach would you prefer?
The text was updated successfully, but these errors were encountered: