August 19, 2015, 7:52am
I’m not sure if it’s correct wording
I just want to ask, when we add a record into collection, let’s say,
posts, is there a way to automatically reload for its API
This can be a not correct question, so please correct me.
I don’t even know if there’s a need for that, I’m just wondering, if we say the app reactive, to which extent it’s reactive (realtime)?
If it’s doable, then which Meteor package can realise that?
August 19, 2015, 9:19am
well, the route link is universal
But if you want after adding new record to be redirected to it, you normaly do it this way.
you fill the form
now u expect redirect if it successfully inserted
so you add to that saving method call callback which redirect you.
exact commands depends on your call and which router you use.
August 19, 2015, 11:30am
I didn’t get why it has to do with redirection?
Let me clarify on the app I’ve just made
Let’s use 2 browsers: Chrome and Firefox.
In Firefox you access
In Chrome, you create a post. So, once a post created it show one post more in json format at
http://askar-blog.meteor.com/api/v1/posts in Firefox.
Does it make sense?
August 19, 2015, 12:03pm
Well, REST API is accessed using 1 HTTP call, browser waits for response and it is done. There is no reactivity.
It is simple http request.
August 19, 2015, 12:38pm
Rest APIs work over HTTP. That means you can’t “reactively” update it. You request the data, wait for a success or fail callback, and then use the data in those.
Usually you use sockets to connect and request updates.
August 20, 2015, 12:13am
Can you please give some examples on this?
For a reactive API you need DDP. What type of client is consuming this API?
DDP clients have been implemented for most modern languages/platforms.