summaryrefslogtreecommitdiffstats
path: root/docs/en/gun/1.0/guide/http/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-05-23 20:47:46 +0200
committerLoïc Hoguin <[email protected]>2017-05-23 20:47:46 +0200
commit41c769ab5c19da92ecba35d9accc4bc123029e8d (patch)
tree67bb7f4d3c9200deb38863666bd41e07ca448aea /docs/en/gun/1.0/guide/http/index.html
parentfe7e6a41a50b5f191b98c1bcdc99d8297f099673 (diff)
downloadninenines.eu-41c769ab5c19da92ecba35d9accc4bc123029e8d.tar.gz
ninenines.eu-41c769ab5c19da92ecba35d9accc4bc123029e8d.tar.bz2
ninenines.eu-41c769ab5c19da92ecba35d9accc4bc123029e8d.zip
Remove the use of bootstrap-carousel
The custom.js file was converted to not use jquery also. Once bootstrap is gone, we can remove jquery entirely.
Diffstat (limited to 'docs/en/gun/1.0/guide/http/index.html')
-rw-r--r--docs/en/gun/1.0/guide/http/index.html26
1 files changed, 20 insertions, 6 deletions
diff --git a/docs/en/gun/1.0/guide/http/index.html b/docs/en/gun/1.0/guide/http/index.html
index 9b345ae1..2f3aadb3 100644
--- a/docs/en/gun/1.0/guide/http/index.html
+++ b/docs/en/gun/1.0/guide/http/index.html
@@ -112,7 +112,7 @@ header if it has not been provided in the request arguments.</p></div>
handling of responses will be explained further on.</p></div>
<div class="sect3">
<h4 id="_get_and_head">GET and HEAD</h4>
-<div class="paragraph"><p>Use <code>gun:get/{2,3}</code> to request a resource.</p></div>
+<div class="paragraph"><p>Use <code>gun:get/{2,3,4}</code> to request a resource.</p></div>
<div class="listingblock">
<div class="title">GET "/organizations/ninenines"</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
@@ -133,7 +133,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>Note that the list of headers has the field name as a binary.
The field value is iodata, which is either a binary or an
iolist.</p></div>
-<div class="paragraph"><p>Use <code>gun:head/{2,3}</code> if you don&#8217;t need the response body.</p></div>
+<div class="paragraph"><p>Use <code>gun:head/{2,3,4}</code> if you don&#8217;t need the response body.</p></div>
<div class="listingblock">
<div class="title">HEAD "/organizations/ninenines"</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
@@ -168,7 +168,7 @@ request body. The PATCH method can be used when this is not
desirable. The request body of a PATCH method may be a partial
representation or a list of instructions on how to update the
resource.</p></div>
-<div class="paragraph"><p>The <code>gun:post/4</code>, <code>gun:put/4</code> and <code>gun:patch/4</code> functions
+<div class="paragraph"><p>The <code>gun:post/{4,5}</code>, <code>gun:put/{4,5}</code> and <code>gun:patch/{4,5}</code> functions
take a body as their fourth argument. These functions do
not require any body-specific header to be set, although
it is always recommended to set the content-type header.
@@ -237,7 +237,7 @@ http://www.gnu.org/software/src-highlite -->
</div>
<div class="sect3">
<h4 id="_delete">DELETE</h4>
-<div class="paragraph"><p>Use <code>gun:delete/{2,3}</code> to delete a resource.</p></div>
+<div class="paragraph"><p>Use <code>gun:delete/{2,3,4}</code> to delete a resource.</p></div>
<div class="listingblock">
<div class="title">DELETE "/organizations/ninenines"</div>
<div class="content"><!-- Generator: GNU source-highlight 3.1.8
@@ -286,7 +286,7 @@ http://www.gnu.org/software/src-highlite -->
</div>
<div class="sect3">
<h4 id="_requests_with_an_arbitrary_method">Requests with an arbitrary method</h4>
-<div class="paragraph"><p>The <code>gun:request/{4,5}</code> function can be used to send requests
+<div class="paragraph"><p>The <code>gun:request/{4,5,6}</code> function can be used to send requests
with a configurable method name. It is mostly useful when you
need a method that Gun does not understand natively.</p></div>
<div class="listingblock">
@@ -444,6 +444,21 @@ http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:flush</span></span>(<span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_redirecting_responses_to_a_different_process">Redirecting responses to a different process</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun allows you to specify which process will handle responses
+to a request via the <code>reply_to</code> request option.</p></div>
+<div class="listingblock">
+<div class="title">GET "/organizations/ninenines" to a different process</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [],
+ #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">Pid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
@@ -527,7 +542,6 @@ http://www.gnu.org/software/src-highlite -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script src="/js/bootstrap-carousel.js"></script>
<script src="/js/bootstrap-dropdown.js"></script>
<script src="/js/custom.js"></script>
</body>