buley
buley

Reputation: 29208

Any way to consume POST requests via browser?

Say you've got an app that can send out POST requests every time an action happens. It allows subscriptions to add/drop quickly and effortlessly.

Say that site is Stackoverflow and it can send a you POST notification every time a new question is asked. Would there be any way to consume notifications like this in browser?

I imagine a case when you spend > 5 min on a page you start to get notifications if it's updated since your last page refresh. I understand how you could do this via long polling but I am wondering if there's any way to hook into these server-to-client POST requests (vs. repeated GET client-to-server requests) from a browser and let data be pushed to you instead.

Upvotes: 2

Views: 109

Answers (2)

MikeAinOz
MikeAinOz

Reputation: 128

How about a lightweight web server on the client like Jetty?

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

For pushing you could take a look at HTML5 WebSocket API.

Upvotes: 5

Related Questions