-3

I am building an SMS channeling app that accepts HTTP requests using PUT method to be delivered via SMS and that sends delivered SMS content to remote addresses. My channeling app accepts HTTP requests using PUT method to send via SMS. However I am puzzled on how I can deliver content to remote devices. Is there an HTTP method like PUSH I can use to pull this off?

a_Neg
  • 11
  • 1
  • 3
  • Welcome to Stack Overflow! Please go through the [tour](http://stackoverflow.com/tour), the [help center](http://stackoverflow.com/help) and the [how to ask a good question](http://stackoverflow.com/help/how-to-ask) sections to see how this site works and to help you improve your current and future questions, which can help you get better answers. – help-info.de Jun 25 '16 at 08:32

1 Answers1

2

REST is an architectural pattern (usually) applied to HTTP which is a request-response protocol in which all requests are initiated by the client. HTTP doesn't really provide a direct mechanism for the server to autonomously push data from the sever to the client. There are (broadly) three ways that you can approach this:

  1. In your client (remote devices) poll the web service for content changes. This is, for example, how most newsreaders work with atom feeds.

  2. Your client can register a 'callback' URL with the web service. So you might provide an resource where you clients POST or PUT their callback URL. You then have to implement something in the service to call that URL whenever there is new content.

  3. Use the Web Socket protocol instead of HTTP.

ma499
  • 601
  • 4
  • 13