# HG changeset patch # User Kim Alvefur # Date 1571000972 -7200 # Node ID a6db99c1420ad6506bf778f45373df7d0f0ce284 # Parent cc6f7e2e4a59c32536ea77c852217d13240a74e8 mod_pubsub_post/README: Add an example of curl-ing Atom data diff -r cc6f7e2e4a59 -r a6db99c1420a mod_pubsub_post/README.markdown --- 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 `` 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 `` 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 ' + Hello' + +``` # Configuration