Author: tmaret
Date: Mon Jul 24 18:08:43 2017
New Revision: 1802847

URL: http://svn.apache.org/viewvc?rev=1802847&view=rev
Log:
SLING-5755 - Complete Distribution documentation

* Fix curl command examples

Modified:
    sling/trunk/contrib/extensions/distribution/README.md

Modified: sling/trunk/contrib/extensions/distribution/README.md
URL: 
http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/README.md?rev=1802847&r1=1802846&r2=1802847&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/README.md (original)
+++ sling/trunk/contrib/extensions/distribution/README.md Mon Jul 24 18:08:43 
2017
@@ -79,15 +79,19 @@ For example a "forward" agent can be def
 The sample package contains endpoints for exposing configuration for 
distribution agents.
 The _DistributionConfigurationResourceProviderFactory_ is used to expose agent 
configurations as resources.
 
+```
   {
       "jcr:primaryType": "sling:OsgiConfig",
       "provider.roots": [ "/libs/sling/distribution/settings/agents" ],
       "kind" : "agent"
   }
+```
 
 Distribution agents' configurations can be retrieved via `HTTP GET`:
 
-- `http -a admin:admin -v -f GET 
http://localhost:8080/libs/sling/distribution/settings/agents/{agentName}`
+```
+$ curl -u admin:admin 
http://localhost:8080/libs/sling/distribution/settings/agents/{agentName}.json
+```
 
 ### Distribution agents services
 
@@ -97,12 +101,13 @@ The _DistributionConfigurationResourcePr
 The sample package contains endpoints for exposing distribution agents.
 The _DistributionServiceResourceProviderFactory_ is used to expose agent 
services as resources.
 
+```
  {
      "jcr:primaryType": "sling:OsgiConfig",
      "provider.roots": [ "/libs/sling/distribution/services/agents" ],
      "kind" : "agent"
  }
-
+```
 
 Distribution agents can be triggered by sending `HTTP POST` requests to
 
@@ -148,11 +153,17 @@ In order to configure the "forward" dist
 
 Send `HTTP POST`request to 
`http://localhost:8080/libs/sling/distribution/services/agents/publish` with 
parameters `action=ADD` and `path=/content`
 
-- create/update content
-```http -a admin:admin -v -f POST 
http://localhost:8080/libs/sling/distribution/services/agents/publish 
action=ADD path=/content/sample1```
-- delete content
-```http -a admin:admin -v -f POST 
http://localhost:8080/libs/sling/distribution/services/agents/publish 
action=DELETE path=/content/sample1```
+#### Create/update content
+
+```
+$ curl -v -u admin:admin 
http://localhost:8080/libs/sling/distribution/services/agents/publish -d 
'action=ADD' -d 'path=/content/sample1'
+```
+
+#### Delete content
 
+```
+$ curl -v -u admin:admin 
http://localhost:8080/libs/sling/distribution/services/agents/publish -d 
'action= DELETE' -d 'path=/content/sample1'
+```
 
 ### Reverse distribution
 
@@ -164,10 +175,12 @@ In order to configure the "reverse" dist
 Send `HTTP POST`request to 
`http://localhost:8080/libs/sling/distribution/services/agents/publish-reverse` 
with parameters `action=PULL`
 
 
-- create/update content
+#### Create/update content
 
-```http -a admin:admin -v -f POST 
http://localhost:8081/libs/sling/distribution/services/agents/reverse 
action=ADD path=/content/sample1```
-```http -a admin:admin -v -f POST 
http://localhost:8080/libs/sling/distribution/services/agents/publish-reverse 
action=PULL```
+```
+$ curl -u admin:admin 
http://localhost:8081/libs/sling/distribution/services/agents/reverse -d 
'action=ADD' -d 'path=/content/sample1'
+$ curl -u admin:admin 
http://localhost:8080/libs/sling/distribution/services/agents/publish-reverse 
-d 'action=PULL'
+```
 
 ### Sync distribution
 
@@ -180,12 +193,12 @@ In order to configure the "sync" distrib
 Send `HTTP POST`request to 
`http://localhost:8080/libs/sling/distribution/services/agents/pubsync` with 
parameters `action=PULL`
 
 
-- create/update content
-
-```http -a admin:admin -v -f POST 
http://localhost:8081/libs/sling/distribution/services/agents/reverse-pubsync 
action=ADD path=/content/sample1```
-```http -a admin:admin -v -f POST 
http://localhost:8080/libs/sling/distribution/services/agents/pubsync 
action=PULL```
-
+#### Create/update content
 
+```
+$ curl -u admin:admin 
http://localhost:8081/libs/sling/distribution/services/agents/reverse-pubsync 
-d 'action=ADD' -d 'path=/content/sample1'
+$ curl -u admin:admin 
http://localhost:8080/libs/sling/distribution/services/agents/pubsync -d 
'action=PULL'
+```
 
 ### Installation
 


Reply via email to