From fd94f20726edeaadeb4132c10b16aa7d8bdea533 Mon Sep 17 00:00:00 2001 From: Travis Reeder Date: Fri, 20 Dec 2013 11:49:48 -0800 Subject: [PATCH] Added custom headers for push queues info. --- mq/reference/api/index.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mq/reference/api/index.md b/mq/reference/api/index.md index 71abeb58..c7220f5c 100644 --- a/mq/reference/api/index.md +++ b/mq/reference/api/index.md @@ -291,7 +291,7 @@ POST /projects/{Project ID}/queues/add subscribers endpoint or the remove subscribers endpoint. The maximum is 64kb for JSONify array of subscribers' hashes. See below for example JSON. +* **subscribers**: An array of subscriber hashes containing a required "url" field and an optional "headers" map for custom headers. This set of subscribers will replace the existing subscribers. See [Push Queues](/mq/reference/push_queues/) to learn more about types of subscribers. To add or remove subscribers, see the add subscribers endpoint or the remove subscribers endpoint. The maximum is 64kb for JSON array of subscribers' hashes. See below for example JSON. * **push_type**: Either `multicast` to push to all subscribers or `unicast` to push to one and only one subscriber. Default is `multicast`. To revert push queue to reqular pull queue set `pull`. * **retries**: How many times to retry on failure. Default is 3. Maximum is 100. @@ -305,7 +305,10 @@ Default is `multicast`. To revert push queue to reqular pull queue set `pull`. "push_type":"multicast", "subscribers": [ {"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"}, - {"url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"} + { + "url": "http://mysterious-brook-1807.herokuapp.com/ironmq_push_2", + "headers": {"Content-Type": "application/json"} + } ] } {% endhighlight %} @@ -324,7 +327,7 @@ Default is `multicast`. To revert push queue to reqular pull queue set `pull`. "retries_delay":60, "subscribers":[ {"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_1"}, - {"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2"} + {"url":"http://mysterious-brook-1807.herokuapp.com/ironmq_push_2", "headers": {"Content-Type": "application/json"}} ] } {% endhighlight %} @@ -352,14 +355,17 @@ POST /projects/{Project ID}/queues/