summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.3/manual/cowboy_req.push/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/cowboy/2.3/manual/cowboy_req.push/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/cowboy/2.3/manual/cowboy_req.push/index.html')
-rw-r--r--docs/en/cowboy/2.3/manual/cowboy_req.push/index.html162
1 files changed, 47 insertions, 115 deletions
diff --git a/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html b/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
index ac272086..e1238d72 100644
--- a/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
+++ b/docs/en/cowboy/2.3/manual/cowboy_req.push/index.html
@@ -62,142 +62,74 @@
<h1 class="lined-header"><span>cowboy_req:push(3)</span></h1>
-<div class="sect1">
<h2 id="_name">Name</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>cowboy_req:push - Push a resource to the client</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>cowboy_req:push - Push a resource to the client</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: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>())
- <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>, #{})
-
-<span style="font-weight: bold"><span style="color: #000000">push</span></span>(<span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #009900">Opts</span>)
- <span style="color: #990000">-&gt;</span> <span style="color: #FF6600">ok</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="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()
-<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:push_opts</span></span>()</tt></pre></div></div>
-<div class="paragraph"><p>Push a resource to the client.</p></div>
-<div class="paragraph"><p>Cowboy handles push requests the same way as if they came
-from the client, including the creation of a request handling
-process, routing and middlewares and so on.</p></div>
-<div class="paragraph"><p>This function does nothing when the HTTP/1.1 protocol is
-used. You may call it safely without first checking whether
-the connection uses HTTP/2.</p></div>
-<div class="paragraph"><p>The header names must be given as lowercase binary strings.
-While header names are case insensitive, Cowboy requires them
-to be given as lowercase to function properly.</p></div>
-<div class="paragraph"><p>Note that the headers must be the headers the client is expected
-to send if it were to perform the request. They are therefore
-request headers, and not response headers.</p></div>
-<div class="paragraph"><p>By default, Cowboy will use the GET method, an empty query string,
-and take the scheme, host and port directly from the current
-request&#8217;s URI. You can override them by passing options.</p></div>
-<div class="paragraph"><p>It is not possible to push resources after sending a response.
-Any attempt will result in an error.</p></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>())
+ <font color="#990000">-&gt;</font> <b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font>, #{})
+
+<b><font color="#000000">push</font></b>(<font color="#009900">Path</font>, <font color="#009900">Headers</font>, <font color="#009900">Req</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:req</font></b>(), <font color="#009900">Opts</font>)
+ <font color="#990000">-&gt;</font> <font color="#FF6600">ok</font>
+
+<font color="#009900">Path</font> <font color="#990000">::</font> <b><font color="#000000">iodata</font></b>() <i><font color="#9A1900">%% case sensitive</font></i>
+<font color="#009900">Headers</font> <font color="#990000">::</font> <b><font color="#000000">cowboy:http_headers</font></b>()
+<font color="#009900">Opts</font> <font color="#990000">::</font> <b><font color="#000000">cowboy_req:push_opts</font></b>()</tt></pre>
+</div></div>
+<p>Push a resource to the client.</p>
+<p>Cowboy handles push requests the same way as if they came from the client, including the creation of a request handling process, routing and middlewares and so on.</p>
+<p>This function does nothing when the HTTP/1.1 protocol is used. You may call it safely without first checking whether the connection uses HTTP/2.</p>
+<p>The header names must be given as lowercase binary strings. While header names are case insensitive, Cowboy requires them to be given as lowercase to function properly.</p>
+<p>Note that the headers must be the headers the client is expected to send if it were to perform the request. They are therefore request headers, and not response headers.</p>
+<p>By default, Cowboy will use the GET method, an empty query string, and take the scheme, host and port directly from the current request&apos;s URI. You can override them by passing options.</p>
+<p>It is not possible to push resources after sending a response. Any attempt will result in an error.</p>
<h2 id="_arguments">Arguments</h2>
-<div class="sectionbody">
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path
-</dt>
-<dd>
-<p>
-The status code for the response.
-</p>
+<dl><dt>Path</dt>
+<dd><p>The status code for the response.</p>
</dd>
-<dt class="hdlist1">
-Headers
-</dt>
-<dd>
-<p>
-The response headers.
-</p>
+<dt>Headers</dt>
+<dd><p>The response headers.</p>
</dd>
-</dl></div>
-<div class="paragraph"><p>Header names must be given as lowercase binary strings.</p></div>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Req
-</dt>
-<dd>
-<p>
-The Req object.
-</p>
+</dl>
+<p>Header names must be given as lowercase binary strings.</p>
+<dl><dt>Req</dt>
+<dd><p>The Req object.</p>
</dd>
-<dt class="hdlist1">
-Opts
-</dt>
-<dd>
-<p>
-Customize the HTTP method or the URI scheme, host, port
-or query string.
-</p>
+<dt>Opts</dt>
+<dd><p>Customize the HTTP method or the URI scheme, host, port or query string.</p>
</dd>
-</dl></div>
-</div>
-</div>
-<div class="sect1">
+</dl>
<h2 id="_return_value">Return value</h2>
-<div class="sectionbody">
-<div class="paragraph"><p>The atom <code>ok</code> is always returned. It can be safely ignored.</p></div>
-</div>
-</div>
-<div class="sect1">
+<p>The atom <code>ok</code> is always returned. It can be safely ignored.</p>
<h2 id="_changelog">Changelog</h2>
-<div class="sectionbody">
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>2.0</strong>: Function introduced.
-</p>
+<ul><li><strong>2.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">Push a resource</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<div class="listingblock"><div class="title">Push 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="font-weight: bold"><span style="color: #000000">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-<div class="listingblock">
-<div class="title">Push a resource with a custom host</div>
-<div class="content"><!-- Generator: GNU source-highlight
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
+<div class="listingblock"><div class="title">Push a resource with a custom host</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="font-weight: bold"><span style="color: #000000">cowboy_req:push</span></span>(<span style="color: #FF0000">"/static/style.css"</span>, #{
- <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/css"</span><span style="color: #990000">&gt;&gt;</span>
-}, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"cdn.example.org"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">Req</span>),</tt></pre></div></div>
-</div>
-</div>
-<div class="sect1">
+<pre><tt><b><font color="#000000">cowboy_req:push</font></b>(<font color="#FF0000">"/static/style.css"</font>, #{
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"accept"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"text/css"</font><font color="#990000">&gt;&gt;</font>
+}, #{<font color="#0000FF">host</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"cdn.example.org"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Req</font>),</tt></pre>
+</div></div>
<h2 id="_see_also">See also</h2>
-<div class="sectionbody">
-<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
-<a href="../cowboy_req.inform">cowboy_req:inform(3)</a>,
-<a href="../cowboy_req.reply">cowboy_req:reply(3)</a>,
-<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p></div>
-</div>
-</div>
+<p><a href="../cowboy_req">cowboy_req(3)</a>, <a href="../cowboy_req.inform">cowboy_req:inform(3)</a>, <a href="../cowboy_req.reply">cowboy_req:reply(3)</a>, <a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a></p>
+