summaryrefslogtreecommitdiffstats
path: root/docs/en/gun/1.0/manual/gun.put/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
committerLoïc Hoguin <[email protected]>2018-06-13 09:54:12 +0200
commit92b54aacc0de5446dd5497c39897b0bbff72e626 (patch)
treec3a98cfec636d1271f5804e5c19b35b208bba00d /docs/en/gun/1.0/manual/gun.put/index.html
parent8b5c3dc972b99f174750123c9e4abc96259c34a9 (diff)
downloadninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.gz
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.tar.bz2
ninenines.eu-92b54aacc0de5446dd5497c39897b0bbff72e626.zip
Rebuild using Asciideck
Diffstat (limited to 'docs/en/gun/1.0/manual/gun.put/index.html')
-rw-r--r--docs/en/gun/1.0/manual/gun.put/index.html192
1 files changed, 58 insertions, 134 deletions
diff --git a/docs/en/gun/1.0/manual/gun.put/index.html b/docs/en/gun/1.0/manual/gun.put/index.html
index ae72aded..71f3f345 100644
--- a/docs/en/gun/1.0/manual/gun.put/index.html
+++ b/docs/en/gun/1.0/manual/gun.put/index.html
@@ -62,165 +62,89 @@
<h1 class="lined-header"><span>gun:put(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>gun:put - Create or replace a resource</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>gun:put - Create or replace a resource</p>
<h2 id="_description">Description</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><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="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>)
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000080">put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">ReqOpts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #009900">StreamRef</span>
-
-<span style="color: #009900">ConnPid</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">pid</span></span>()
-<span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()}]
-<span style="color: #009900">Body</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
-<span style="color: #009900">ReqOpts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">gun:req_opts</span></span>()
-<span style="color: #009900">StreamRef</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">reference</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Create or replace a resource.</p></div>
-<div class="paragraph"><p>The behavior of this function varies depending on whether
-a body is provided.</p></div>
-<div class="paragraph"><p>The function <code>put/3</code> expects either a content-length
-or content-type header to indicate that a body will be
-sent afterwards. The body can then be sent using
-<a href="../gun.data">gun:data(3)</a>.</p></div>
-<div class="paragraph"><p>The function <code>put/4,5</code> sends the entire request, including
-the request body, immediately. It is therefore not possible
-to use <a href="../gun.data">gun:data(3)</a> after that. You
-should provide a content-type header. Gun will set the
-content-length header automatically.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>)
+ <font color="#990000">-&gt;</font> <b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, #{})
+
+<b><font color="#000080">put</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Body</font>, <font color="#009900">ReqOpts</font>)
+ <font color="#990000">-&gt;</font> <font color="#009900">StreamRef</font>
+
+<font color="#009900">ConnPid</font> <font color="#990000">::</font> <b><font color="#000080">pid</font></b>()
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">Headers</font> <font color="#990000">::</font> [{<b><font color="#000080">binary</font></b>(), <b><font color="#000000">iodata</font></b>()}]
+<font color="#009900">Body</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>()
+<font color="#009900">ReqOpts</font> <font color="#990000">::</font> <b><font color="#000000">gun:req_opts</font></b>()
+<font color="#009900">StreamRef</font> <font color="#990000">::</font> <b><font color="#000080">reference</font></b>()</tt></pre>
+</div></div>
+<p>Create or replace a resource.</p>
+<p>The behavior of this function varies depending on whether a body is provided.</p>
+<p>The function <code>put/3</code> expects either a content-length or content-type header to indicate that a body will be sent afterwards. The body can then be sent using <a href="../gun.data">gun:data(3)</a>.</p>
+<p>The function <code>put/4,5</code> sends the entire request, including the request body, immediately. It is therefore not possible to use <a href="../gun.data">gun:data(3)</a> after that. You should provide a content-type header. Gun will set the content-length header automatically.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-ConnPid
-</dt>
-<dd>
-<p>
-The pid of the Gun connection process.
-</p>
+<dl><dt>ConnPid</dt>
+<dd><p>The pid of the Gun connection process.</p>
</dd>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-Path to the resource.
-</p>
+<dt>Path</dt>
+<dd><p>Path to the resource.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-Additional request headers.
-</p>
+<dt>Headers</dt>
+<dd><p>Additional request headers.</p>
</dd>
-<dt class="hdlist1">
-Body
-</dt>
-<dd>
-<p>
-Request body.
-</p>
+<dt>Body</dt>
+<dd><p>Request body.</p>
</dd>
-<dt class="hdlist1">
-ReqOpts
-</dt>
-<dd>
-<p>
-Request options.
-</p>
+<dt>ReqOpts</dt>
+<dd><p>Request options.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>A reference that identifies the newly created stream is
-returned. It is this reference that must be passed in
-subsequent calls and will be received in messages related
-to this new stream.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>A reference that identifies the newly created stream is returned. It is this reference that must be passed in subsequent calls and will be received in messages related to this new stream.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>1.0</strong>: Function introduced.
-</p>
+<ul><li><strong>1.0</strong>: Function introduced.
</li>
-</ul></div>
-</div>
-</div>
-<div class="sect1">
+</ul>
<h2 id="_examples">Examples</h2>
-<div class="sectionbody">
-<div class="listingblock">
-<div class="title">Put a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Put a resource</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:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Put a resource in multiple calls</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Put a resource in multiple calls</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:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>, [
- {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}
-])<span style="color: #990000">.</span>
-<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Put a resource with request options</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>, [
+ {<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}
+])<font color="#990000">.</font>
+<b><font color="#000000">gun:data</font></b>(<font color="#009900">ConnPid</font>, <font color="#009900">StreamRef</font>, <font color="#FF6600">fin</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>)<font color="#990000">.</font></tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Put a resource with request options</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:put</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/lang/fr_FR/hello"</span>,
- [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Bonjour !"</span><span style="color: #990000">&gt;&gt;</span>,
- #{<span style="color: #0000FF">reply_to</span> <span style="color: #990000">=&gt;</span> <span style="color: #009900">ReplyToPid</span>})<span style="color: #990000">.</span></tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><font color="#009900">StreamRef</font> <font color="#990000">=</font> <b><font color="#000000">gun:put</font></b>(<font color="#009900">ConnPid</font>, <font color="#FF0000">"/lang/fr_FR/hello"</font>,
+ [{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"content-type"</font><font color="#990000">&gt;&gt;</font>, <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/plain"</font><font color="#990000">&gt;&gt;</font>}],
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"Bonjour !"</font><font color="#990000">&gt;&gt;</font>,
+ #{<font color="#0000FF">reply_to</font> <font color="#990000">=&gt;</font> <font color="#009900">ReplyToPid</font>})<font color="#990000">.</font></tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../gun">gun(3)</a>,
-<a href="../gun.patch">gun:patch(3)</a>,
-<a href="../gun.post">gun:post(3)</a>,
-<a href="../gun.await">gun:await(3)</a>,
-<a href="../gun.await_body">gun:await_body(3)</a>,
-<a href="../gun_push">gun_push(3)</a>,
-<a href="../gun_inform">gun_inform(3)</a>,
-<a href="../gun_response">gun_response(3)</a>,
-<a href="../gun_data">gun_data(3)</a></p></div>
-</div>
-</div>
+<p><a href="../gun">gun(3)</a>, <a href="../gun.patch">gun:patch(3)</a>, <a href="../gun.post">gun:post(3)</a>, <a href="../gun.await">gun:await(3)</a>, <a href="../gun.await_body">gun:await_body(3)</a>, <a href="../gun_push">gun_push(3)</a>, <a href="../gun_inform">gun_inform(3)</a>, <a href="../gun_response">gun_response(3)</a>, <a href="../gun_data">gun_data(3)</a></p>
+