Changeset

3719:a6db99c1420a

mod_pubsub_post/README: Add an example of curl-ing Atom data
author Kim Alvefur <zash@zash.se>
date Sun, 13 Oct 2019 23:09:32 +0200
parents 3718:cc6f7e2e4a59
children 3720:8e7d400d4db3
files mod_pubsub_post/README.markdown
diffstat 1 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_post/README.markdown	Sun Oct 13 16:56:52 2019 +0200
+++ b/mod_pubsub_post/README.markdown	Sun Oct 13 23:09:32 2019 +0200
@@ -11,16 +11,28 @@
 Atom feeds, arbitrary XML, or arbitrary JSON. The type should be
 indicated via the `Content-Type` header.
 
+-   JSON data is wrapped in a [XEP-0335] container.
+-   An Atom feed may have many `<entry>` and each one is published as
+    its own PubSub item.
+-   Other XML is simply published to a randomly named item as-is.
+
+## JSON example
+
 ``` {.bash}
 curl http://localhost:5280/pubsub_post/princely_musings \
     -H "Content-Type: application/json" \
     --data-binary '{"musing":"To be, or not to be: that is the question"}'
 ```
 
--   JSON data is wrapped in a [XEP-0335] container.
--   An Atom feed may have many `<entry>` and each one is published as
-    its own PubSub item.
--   Other XML is simply published to a randomly named item as-is.
+## Atom example
+
+``` {.bash}
+curl http://localhost:5280/pubsub_post/princely_musings \
+    -H "Content-Type: application/xml" \
+    --data-binary '<feed xmlns="http://www.w3.org/2005/Atom">
+        <entry><title>Hello</title></entry></feed>'
+
+```
 
 # Configuration