diff options
Diffstat (limited to 'docs/en/cowboy/2.0/guide')
31 files changed, 375 insertions, 31 deletions
diff --git a/docs/en/cowboy/2.0/guide/architecture/index.html b/docs/en/cowboy/2.0/guide/architecture/index.html index ef816699..ed86e695 100644 --- a/docs/en/cowboy/2.0/guide/architecture/index.html +++ b/docs/en/cowboy/2.0/guide/architecture/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Architecture</title> diff --git a/docs/en/cowboy/2.0/guide/broken_clients/index.html b/docs/en/cowboy/2.0/guide/broken_clients/index.html index 049ee878..a61dadc8 100644 --- a/docs/en/cowboy/2.0/guide/broken_clients/index.html +++ b/docs/en/cowboy/2.0/guide/broken_clients/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Dealing with broken clients</title> diff --git a/docs/en/cowboy/2.0/guide/constraints/index.html b/docs/en/cowboy/2.0/guide/constraints/index.html index f9c072b6..2428e8d4 100644 --- a/docs/en/cowboy/2.0/guide/constraints/index.html +++ b/docs/en/cowboy/2.0/guide/constraints/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Constraints</title> diff --git a/docs/en/cowboy/2.0/guide/cookies/index.html b/docs/en/cowboy/2.0/guide/cookies/index.html index 4aea8eb0..e4c982cc 100644 --- a/docs/en/cowboy/2.0/guide/cookies/index.html +++ b/docs/en/cowboy/2.0/guide/cookies/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Using cookies</title> diff --git a/docs/en/cowboy/2.0/guide/erlang_web/index.html b/docs/en/cowboy/2.0/guide/erlang_web/index.html index 111e2698..08e0c069 100644 --- a/docs/en/cowboy/2.0/guide/erlang_web/index.html +++ b/docs/en/cowboy/2.0/guide/erlang_web/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Erlang and the Web</title> diff --git a/docs/en/cowboy/2.0/guide/flow_diagram.asciidoc b/docs/en/cowboy/2.0/guide/flow_diagram.asciidoc new file mode 100644 index 00000000..93e9051d --- /dev/null +++ b/docs/en/cowboy/2.0/guide/flow_diagram.asciidoc @@ -0,0 +1,3 @@ +== Flow diagram + +Placeholder chapter. diff --git a/docs/en/cowboy/2.0/guide/flow_diagram/index.html b/docs/en/cowboy/2.0/guide/flow_diagram/index.html new file mode 100644 index 00000000..16ddfd8b --- /dev/null +++ b/docs/en/cowboy/2.0/guide/flow_diagram/index.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> + + <meta name="generator" content="Hugo 0.16" /> + + <title>Nine Nines: Flow diagram</title> + + <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'> + + <link href="/css/bootstrap.min.css" rel="stylesheet"> + <link href="/css/99s.css" rel="stylesheet"> + + <link rel="shortcut icon" href="/img/ico/favicon.ico"> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png"> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png"> + <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png"> + + +</head> + + +<body class=""> + <header id="page-head"> + <div id="topbar" class="container"> + <div class="row"> + <div class="span2"> + <h1 id="logo"><a href="/" title="99s">99s</a></h1> + </div> + <div class="span10"> + + <div id="side-header"> + <nav> + <ul> + <li><a title="Hear my thoughts" href="/articles">Articles</a></li> + <li><a title="Watch my talks" href="/talks">Talks</a></li> + <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li> + <li><a title="Request my services" href="/services">Consulting & Training</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li> + <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a> + </li> + <li> + <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a> + </li> + </ul> + </div> + </div> + </div> + </div> + + +</header> + +<div id="contents" class="two_col"> +<div class="container"> +<div class="row"> +<div id="docs" class="span9 maincol"> + +<h1 class="lined-header"><span>Flow diagram</span></h1> + +<div class="paragraph"><p>Placeholder chapter.</p></div>
+ + + +</div> + +<div class="span3 sidecol"> + + +<h3> + Cowboy + 2.0 + + User Guide +</h3> + +<ul> + + <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li> + + + <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li> + + +</ul> + +<h4 id="docs-nav">Navigation</h4> + +<h4>Version select</h4> +<ul> + + + + <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li> + + <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li> + +</ul> + +</div> +</div> +</div> +</div> + + <footer> + <div class="container"> + <div class="row"> + <div class="span6"> + <p id="scroll-top"><a href="#">↑ Scroll to top</a></p> + <nav> + <ul> + <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li> + </ul> + </nav> + </div> + <div class="span6 credits"> + <p><img src="/img/footer_logo.png"></p> + <p>Copyright © Loïc Hoguin 2012-2016</p> + </div> + </div> + </div> + </footer> + + + <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> +</html> + + diff --git a/docs/en/cowboy/2.0/guide/getting_started.asciidoc b/docs/en/cowboy/2.0/guide/getting_started.asciidoc index e9a27567..be11e489 100644 --- a/docs/en/cowboy/2.0/guide/getting_started.asciidoc +++ b/docs/en/cowboy/2.0/guide/getting_started.asciidoc @@ -64,7 +64,7 @@ handler. We will modify the 'Makefile' to tell the build system it needs to fetch and compile Cowboy: -[source,make] +[source,makefile] ---- PROJECT = hello_erlang diff --git a/docs/en/cowboy/2.0/guide/getting_started/index.html b/docs/en/cowboy/2.0/guide/getting_started/index.html index 85cd039d..34957699 100644 --- a/docs/en/cowboy/2.0/guide/getting_started/index.html +++ b/docs/en/cowboy/2.0/guide/getting_started/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Getting started</title> @@ -140,7 +140,16 @@ handler.</p></div> <div class="paragraph"><p>We will modify the <em>Makefile</em> to tell the build system it needs to
fetch and compile Cowboy:</p></div>
<div class="listingblock">
-<div class="content"></div></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">PROJECT =</span> hello_erlang
+
+<span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">dep_cowboy_commit =</span> master
+
+include erlang.mk</tt></pre></div></div>
<div class="paragraph"><p>If you run <code>make run</code> now, Cowboy will be included in the release
and started automatically. This is not enough however, as Cowboy
doesn’t do anything by default. We still need to tell Cowboy to
diff --git a/docs/en/cowboy/2.0/guide/handlers/index.html b/docs/en/cowboy/2.0/guide/handlers/index.html index 790b7d28..c45d1adb 100644 --- a/docs/en/cowboy/2.0/guide/handlers/index.html +++ b/docs/en/cowboy/2.0/guide/handlers/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Handlers</title> diff --git a/docs/en/cowboy/2.0/guide/hooks/index.html b/docs/en/cowboy/2.0/guide/hooks/index.html index 31b73d25..b52ff4e7 100644 --- a/docs/en/cowboy/2.0/guide/hooks/index.html +++ b/docs/en/cowboy/2.0/guide/hooks/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Hooks</title> diff --git a/docs/en/cowboy/2.0/guide/index.html b/docs/en/cowboy/2.0/guide/index.html index 79927caf..325de8e7 100644 --- a/docs/en/cowboy/2.0/guide/index.html +++ b/docs/en/cowboy/2.0/guide/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Cowboy User Guide</title> diff --git a/docs/en/cowboy/2.0/guide/introduction/index.html b/docs/en/cowboy/2.0/guide/introduction/index.html index f302a75f..44548d49 100644 --- a/docs/en/cowboy/2.0/guide/introduction/index.html +++ b/docs/en/cowboy/2.0/guide/introduction/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Introduction</title> diff --git a/docs/en/cowboy/2.0/guide/loop_handlers/index.html b/docs/en/cowboy/2.0/guide/loop_handlers/index.html index 9b25dc97..df99322e 100644 --- a/docs/en/cowboy/2.0/guide/loop_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/loop_handlers/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Loop handlers</title> diff --git a/docs/en/cowboy/2.0/guide/middlewares/index.html b/docs/en/cowboy/2.0/guide/middlewares/index.html index 09894d10..b3c10e5e 100644 --- a/docs/en/cowboy/2.0/guide/middlewares/index.html +++ b/docs/en/cowboy/2.0/guide/middlewares/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Middlewares</title> diff --git a/docs/en/cowboy/2.0/guide/modern_web/index.html b/docs/en/cowboy/2.0/guide/modern_web/index.html index 26f1b213..71a76041 100644 --- a/docs/en/cowboy/2.0/guide/modern_web/index.html +++ b/docs/en/cowboy/2.0/guide/modern_web/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: The modern Web</title> diff --git a/docs/en/cowboy/2.0/guide/multipart/index.html b/docs/en/cowboy/2.0/guide/multipart/index.html index 2a443f10..dba83e90 100644 --- a/docs/en/cowboy/2.0/guide/multipart/index.html +++ b/docs/en/cowboy/2.0/guide/multipart/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Multipart requests</title> diff --git a/docs/en/cowboy/2.0/guide/overview/index.html b/docs/en/cowboy/2.0/guide/overview/index.html index 70a191dd..b5c779ff 100644 --- a/docs/en/cowboy/2.0/guide/overview/index.html +++ b/docs/en/cowboy/2.0/guide/overview/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Request overview</title> diff --git a/docs/en/cowboy/2.0/guide/req/index.html b/docs/en/cowboy/2.0/guide/req/index.html index 77987861..342684d4 100644 --- a/docs/en/cowboy/2.0/guide/req/index.html +++ b/docs/en/cowboy/2.0/guide/req/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: The Req object</title> diff --git a/docs/en/cowboy/2.0/guide/req_body/index.html b/docs/en/cowboy/2.0/guide/req_body/index.html index 2b0b2a49..f267b82d 100644 --- a/docs/en/cowboy/2.0/guide/req_body/index.html +++ b/docs/en/cowboy/2.0/guide/req_body/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Reading the request body</title> diff --git a/docs/en/cowboy/2.0/guide/resource_design/index.html b/docs/en/cowboy/2.0/guide/resource_design/index.html index 94d6307e..8a4f0227 100644 --- a/docs/en/cowboy/2.0/guide/resource_design/index.html +++ b/docs/en/cowboy/2.0/guide/resource_design/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Designing a resource handler</title> diff --git a/docs/en/cowboy/2.0/guide/resp/index.html b/docs/en/cowboy/2.0/guide/resp/index.html index 0baaa4c9..424a97d3 100644 --- a/docs/en/cowboy/2.0/guide/resp/index.html +++ b/docs/en/cowboy/2.0/guide/resp/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Sending a response</title> diff --git a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html index c5ca894b..d54e6a65 100644 --- a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html +++ b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: REST flowcharts</title> diff --git a/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc b/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc index f28c0661..748fca49 100644 --- a/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc +++ b/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc @@ -62,7 +62,8 @@ if it is undefined, moving directly to the next step. Similarly, | allow_missing_post | `true` | charsets_provided | skip | content_types_accepted | none -| content_types_provided | `$$[{{<<"text">>, <<"html">>, '*'}, to_html}]$$` +// @todo Space required for the time being: https://github.com/spf13/hugo/issues/2398 +| content_types_provided | `[{{ <<"text">>, <<"html">>, '*'}, to_html}]` | delete_completed | `true` | delete_resource | `false` | expires | `undefined` diff --git a/docs/en/cowboy/2.0/guide/rest_handlers/index.html b/docs/en/cowboy/2.0/guide/rest_handlers/index.html index 36e87f9e..da6288fb 100644 --- a/docs/en/cowboy/2.0/guide/rest_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/rest_handlers/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: REST handlers</title> @@ -151,7 +151,195 @@ cellspacing="0" cellpadding="4"> </tr>
<tr>
<td align="left" valign="top"><p class="table">content_types_provided</p></td>
-<td align="center" valign="top"><p class="table">`$$[</p></td>
+<td align="center" valign="top"><p class="table"><code>[{{ <<"text">>, <<"html">>, '*'}, to_html}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">delete_completed</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">delete_resource</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">expires</p></td>
+<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">forbidden</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">generate_etag</p></td>
+<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">is_authorized</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">is_conflict</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">known_methods</p></td>
+<td align="center" valign="top"><p class="table"><code>[<<"GET">>, <<"HEAD">>, <<"POST">>, <<"PUT">>, <<"PATCH">>, <<"DELETE">>, <<"OPTIONS">>]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">languages_provided</p></td>
+<td align="center" valign="top"><p class="table">skip</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">last_modified</p></td>
+<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">malformed_request</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">moved_permanently</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">moved_temporarily</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">multiple_choices</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">options</p></td>
+<td align="center" valign="top"><p class="table"><code>ok</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">previously_existed</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">resource_exists</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">service_available</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">uri_too_long</p></td>
+<td align="center" valign="top"><p class="table"><code>false</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">valid_content_headers</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">valid_entity_length</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">variances</p></td>
+<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>As you can see, Cowboy tries to move on with the request whenever
+possible by using well thought out default values.</p></div>
+<div class="paragraph"><p>In addition to these, there can be any number of user-defined
+callbacks that are specified through <code>content_types_accepted/2</code>
+and <code>content_types_provided/2</code>. They can take any name, however
+it is recommended to use a separate prefix for the callbacks of
+each function. For example, <code>from_html</code> and <code>to_html</code> indicate
+in the first case that we’re accepting a resource given as HTML,
+and in the second case that we send one as HTML.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_meta_data">Meta data</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy will set informative meta values at various points of the
+execution. You can retrieve them using <code>cowboy_req:meta/{2,3}</code>.
+The values are defined in the following table.</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Meta key </th>
+<th align="left" valign="top"> Details</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">media_type</p></td>
+<td align="left" valign="top"><p class="table">The content-type negotiated for the response entity.</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">language</p></td>
+<td align="left" valign="top"><p class="table">The language negotiated for the response entity.</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">charset</p></td>
+<td align="left" valign="top"><p class="table">The charset negotiated for the response entity.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>They can be used to send a proper body with the response to a
+request that used a method other than HEAD or GET.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_response_headers">Response headers</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy will set response headers automatically over the execution
+of the REST code. They are listed in the following table.</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Header name </th>
+<th align="left" valign="top"> Details</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">content-language</p></td>
+<td align="left" valign="top"><p class="table">Language used in the response body</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">content-type</p></td>
+<td align="left" valign="top"><p class="table">Media type and charset of the response body</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">etag</p></td>
+<td align="left" valign="top"><p class="table">Etag of the resource</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">expires</p></td>
+<td align="left" valign="top"><p class="table">Expiration date of the resource</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">last-modified</p></td>
+<td align="left" valign="top"><p class="table">Last modification date for the resource</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">location</p></td>
+<td align="left" valign="top"><p class="table">Relative or absolute URI to the requested resource</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">vary</p></td>
+<td align="left" valign="top"><p class="table">List of headers that may change the representation of the resource</p></td>
</tr>
</tbody>
</table>
diff --git a/docs/en/cowboy/2.0/guide/rest_principles/index.html b/docs/en/cowboy/2.0/guide/rest_principles/index.html index 1b4335dd..9696e420 100644 --- a/docs/en/cowboy/2.0/guide/rest_principles/index.html +++ b/docs/en/cowboy/2.0/guide/rest_principles/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: REST principles</title> diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html index 01c5dd7d..b2ba3e8f 100644 --- a/docs/en/cowboy/2.0/guide/routing/index.html +++ b/docs/en/cowboy/2.0/guide/routing/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Routing</title> diff --git a/docs/en/cowboy/2.0/guide/static_files/index.html b/docs/en/cowboy/2.0/guide/static_files/index.html index 0edde8a3..f7ea1472 100644 --- a/docs/en/cowboy/2.0/guide/static_files/index.html +++ b/docs/en/cowboy/2.0/guide/static_files/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Static files</title> diff --git a/docs/en/cowboy/2.0/guide/sub_protocols/index.html b/docs/en/cowboy/2.0/guide/sub_protocols/index.html index 34f7db9b..928d4965 100644 --- a/docs/en/cowboy/2.0/guide/sub_protocols/index.html +++ b/docs/en/cowboy/2.0/guide/sub_protocols/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Sub protocols</title> diff --git a/docs/en/cowboy/2.0/guide/ws_handlers/index.html b/docs/en/cowboy/2.0/guide/ws_handlers/index.html index e8121220..2b0e30a2 100644 --- a/docs/en/cowboy/2.0/guide/ws_handlers/index.html +++ b/docs/en/cowboy/2.0/guide/ws_handlers/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: Handling Websocket connections</title> diff --git a/docs/en/cowboy/2.0/guide/ws_protocol/index.html b/docs/en/cowboy/2.0/guide/ws_protocol/index.html index 70ba4917..70a3adfe 100644 --- a/docs/en/cowboy/2.0/guide/ws_protocol/index.html +++ b/docs/en/cowboy/2.0/guide/ws_protocol/index.html @@ -7,7 +7,7 @@ <meta name="description" content=""> <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara"> - <meta name="generator" content="Hugo 0.15" /> + <meta name="generator" content="Hugo 0.16" /> <title>Nine Nines: The Websocket protocol</title> |