Skip to content
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

No notification through WebSocket when inserting documents in a solid container #4

Open
DavideAllavena opened this issue Feb 28, 2018 · 5 comments

Comments

@DavideAllavena
Copy link

With this toy example i get no notification when inserting or deleting resources on http://solidtest.space:

const WebSocket = require('ws');
var ws = new WebSocket('wss://davide.solidtest.space/public/twee-fi/');

ws.on('open', function open() {
  console.log('Done');
});

ws.on('message', function incoming(data) {
  console.log(data)
});

The request:

curl -XPUT -H "Content-Type: text/turtle" -H'Cookie:somecookie' 'https://davide.solidtest.space/public/twee-fi/test.ttl' -d "<http://subje.ct> <https://predica.te> <http://obje.ct> .\n"
@melvincarvalho
Copy link
Contributor

See also chatlog

@DavideAllavena is this a blocker? If so, I suggest we add the priority label to this.

@DavideAllavena
Copy link
Author

Yes this is a blocker. We are developing an application that creates a web-socket to get notified on changes in a container. We can temporarily create a dirt workaround. But we are willing not to do it.

@melvincarvalho
Copy link
Contributor

@DavideAllavena ok thanks, will try and prioritize this. Or if you manage to work out a patch, we'll get it upstream asap! :)

@michielbdejong
Copy link
Member

michielbdejong commented Jan 21, 2019

@DavideAllavena Is this still an issue? you should send sub /public/twee-fi/ from your WebSocket client to subscribe it. Example: in one window, type:

 wscat --no-check --connect wss://localhost:8443/
connected (press CTRL+C to quit)
> sub /inbox
< ack /inbox

Then in another window, type:

curl -kX  POST  https://localhost:8443/inbox

You'll see < pub /inbox appear.

@michielbdejong
Copy link
Member

We just found out that it's because you're using PUT instead of POST, see #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants