-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Match topic selector on subscription endpoint #947
Comments
Hi, First of all, you need to use the absolute URI templates. Relative URLs will not work. Aslo, prefer encoding with If this doesn't fix the issue, could you please copy the full request and response please? (they are available in the HttpClient tab of the Symfony profiler). Thanks, |
Hi The request from the browser is pretty standard:
Its response:
My call to the subscription API, while having a react app subscribed to "https://api.example.fr/users/447/notifications":
Response:
One thing to note, is that when I am subscribed to the By the way, if I understood the specs correctly, I should be able to subscribe to the subscription event from my server but I'm not sure what the topic should be ? Having the EventSourceHttpClient url like EDIT: According to the uri template tester, I should use the |
Hi,
I've been trying to get a list of users connected, and thought of using the subscription endpoint alongside with its SSE topics to be able to keep a list of online user by checking for subscriptions against
/users/1234/notifications
, where 1234 is the user id, which is a topic everyone on the app is always subscribing to.On the worker which will be checking those, I'm generating a JWT with the subscribe
*
permissions then I call the endpoint:I indeed get all the logged in users. But when I try to specify a topic selector to have only those subscription and not every subscription for every topic, I get an empty response...
Am I missing something or is there an issue ? I've seen this GH issue #706 but the proposed PR is merged and I'm running latest caddy/mercure hub
The text was updated successfully, but these errors were encountered: