Sugar Network/API: Difference between revisions

Line 135: Line 135:
To start subscription, send the following request:
To start subscription, send the following request:


  '''GET''' /?cmd='''subscribe'''[&only_commits=1]
  '''GET''' /?cmd='''subscribe'''
 
Where:
* {{Code|only_commits}},<br>subscribers can be notified only with ''commit'' events; that is useful to minimize interactions between server and clients.


Response will be served with ''text/event-stream'' MIME type for default SSE message type. SSE message will be a JSONified object with the following, at least, attributes:
Response will be served with ''text/event-stream'' MIME type for default SSE message type. SSE message will be a JSONified object with the following, at least, attributes: