smw
smw

Reputation: 477

Pass data to front end with REST api

This is probably simple but I cant seem to understand changing a front end on back end data changes.

So I have a front end that is plotting 3d points. I also have a separate program that is getting and processing the points. When I finish processing I want to send them to my front end and tell it to draw them. How do I do this?? What tells the front end to wait and listen to receive data?

I have tried making my backed send a PUT request when it is finished but I dont understand how to connect the two...

Upvotes: 0

Views: 416

Answers (1)

Evert
Evert

Reputation: 99523

In a typical REST scenario there's no way for a server to tell a client when something changed. However, it's possible to build things on top of a REST service to help with this.

Some common examples:

  • Have the client poll every x seconds for changes
  • HTTP 'Long polling' (see event streams)
  • Web Sockets

Upvotes: 1

Related Questions