| 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. |
| | 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 forward received notifications for the node by performing a `POST` request on the URI. |
| | 91 | |
| | 92 | Notifications 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`. |
| | 182 | |
| | 183 | {{{ |
| | 184 | POST /other_callback HTTP/1.1 |
| | 185 | Host: localhost |
| | 186 | Content-Type: application/atom+xml;type=feed;charset=utf-8 |
| | 187 | Content-Length: 509 |
| | 188 | Referer: 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 | }}} |