]> git.aero2k.de Git - sirius.git/commitdiff
add docs for JSON type
authorJoe Rickerby <joerick@mac.com>
Thu, 11 Jan 2018 19:46:08 +0000 (19:46 +0000)
committerJoe Rickerby <joerick@mac.com>
Thu, 11 Jan 2018 19:46:08 +0000 (19:46 +0000)
sirius/web/templates/print_key.html

index 9f09615a90b484741c7527de873da3a95ea633d5..1e52ee1e260430f822c23e4202d76c610e2301b7 100644 (file)
     -H 'content-type: image/gif' \
     --data-binary @-</code></pre>
 
+<h4>JSON</h4>
+<p>
+    <code>Content-Type: application/json</code>
+</p>
+<p>
+    Print Keys accept JSON encoded text or HTML. This is great for working with <a href="http://ifttt.com">IFTTT</a>!
+</p>
+<p>
+    Send HTML using the <tt>html</tt> key or plain text using the <tt>text</tt> key.
+</p>
+<pre><code>curl '{{request.url}}?from=jsonexample' \
+    -H 'content-type: application/json' \
+    -d '{"html":"&lt;h1&gt;header!&lt;/h1&gt;"}'</code></pre>
+
 <h4>Text</h4>
 <p>
     <code>Content-Type: text/plain</code>