Changes between Version 7 and Version 8 of HTTP_Interface


Ignore:
Timestamp:
03/02/2008 14:51:37 (5 years ago)
Author:
ralphm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HTTP_Interface

    v7 v8  
    8888== Subscribing to remote nodes and receiving notifications == 
    8989 
    90 To subscribe from the local service to changes to remote resources though HTTP, the gateway has a publish-subscribe client and exposes it through HTTP. The HTTP client provides the XMPP URI of the (remote) node, and a callback URI. The latter is used to `POST` Atom Entry documents embedded in notifications received from the subscribed node to. 
     90To subscribe from the local service to changes to remote resources though HTTP, the gateway has a publish-subscribe client and exposes it through HTTP. The HTTP client provides the XMPP URI of the (remote) node, and a callback URI. The latter is used to forward received notifications for the node by performing a `POST` request on the URI. 
     91 
     92Notifications can be about new or updated items for that node, or the deletion of the node. In case of item notifications, an Atom Entry  document or Atom Feed document is the embedded entity in the request. For node deletion, the `POST` request does not carry an entity, but has the `Event` header set to `DELETED`. 
    9193 
    9294[[Image(gatewayed_subscription.png)]] 
     
    178180 
    179181For now, the response to the HTTP request is ignored, but at some point it might be used to retry the notification on temporary failure or unsubscription on permanent failure. 
     182 
     183{{{ 
     184POST /other_callback HTTP/1.1 
     185Host: localhost 
     186Content-Type: application/atom+xml;type=feed;charset=utf-8 
     187Content-Length: 509 
     188Referer: xmpp:example.com;?node=news_feed 
     189 
     190<feed xmlns="http://www.w3.org/2005/Atom"> 
     191  <entry> 
     192    <title>Item1</title> 
     193    <id>urn:uuid:4c22de69-ad82-49d7-820d-1d1ccee87b4a</id> 
     194    <updated>2008-03-02T13:49:01Z</updated> 
     195    <author><name>Jane Doe</name></author> 
     196    <content>Some text.</content> 
     197  </entry> 
     198  <entry> 
     199    <title>Item2</title> 
     200    <id>urn:uuid:0deddff7-8ff3-4e6a-a0eb-52a08cc588f1</id> 
     201    <updated>2008-03-02T13:49:03Z</updated> 
     202    <author><name>Jane Doe</name></author> 
     203    <content>Some other text.</content> 
     204  </entry> 
     205</feed> 
     206}}}