diff options
Diffstat (limited to '_build/static/docs/en/cowboy/1.0')
62 files changed, 23885 insertions, 0 deletions
diff --git a/_build/static/docs/en/cowboy/1.0/guide/architecture/index.html b/_build/static/docs/en/cowboy/1.0/guide/architecture/index.html new file mode 100644 index 00000000..ad14c180 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/architecture/index.html @@ -0,0 +1,202 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Architecture</span></h1> + +<p>Cowboy is a lightweight HTTP server.</p> + +<p>It is built on top of Ranch. Please see the Ranch guide for more information.</p> + +<h2 id="one_process_per_connection">One process per connection</h2> + +<p>It uses only one process per connection. The process where your code runs is the process controlling the socket. Using one process instead of two allows for lower memory usage.</p> + +<p>Because there can be more than one request per connection with the keepalive feature of HTTP/1.1, that means the same process will be used to handle many requests.</p> + +<p>Because of this, you are expected to make sure your process cleans up before terminating the handling of the current request. This may include cleaning up the process dictionary, timers, monitoring and more.</p> + +<h2 id="binaries">Binaries</h2> + +<p>It uses binaries. Binaries are more efficient than lists for representing strings because they take less memory space. Processing performance can vary depending on the operation. Binaries are known for generally getting a great boost if the code is compiled natively. Please see the HiPE documentation for more details.</p> + +<h2 id="date_header">Date header</h2> + +<p>Because querying for the current date and time can be expensive, Cowboy generates one <code>Date</code> header value every second, shares it to all other processes, which then simply copy it in the response. This allows compliance with HTTP/1.1 with no actual performance loss.</p> + +<h2 id="max_connections">Max connections</h2> + +<p>By default the maximum number of active connections is set to a generally accepted big enough number. This is meant to prevent having too many processes performing potentially heavy work and slowing everything else down, or taking up all the memory.</p> + +<p>Disabling this feature, by setting the <code>{max_connections, infinity}</code> protocol option, would give you greater performance when you are only processing short-lived requests.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/broken_clients/index.html b/_build/static/docs/en/cowboy/1.0/guide/broken_clients/index.html new file mode 100644 index 00000000..d0046439 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/broken_clients/index.html @@ -0,0 +1,212 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Dealing with broken clients</span></h1> + +<p>There exists a very large number of implementations for the HTTP protocol. Most widely used clients, like browsers, follow the standard quite well, but others may not. In particular custom enterprise clients tend to be very badly written.</p> + +<p>Cowboy tries to follow the standard as much as possible, but is not trying to handle every possible special cases. Instead Cowboy focuses on the cases reported in the wild, on the public Web.</p> + +<p>That means clients that ignore the HTTP standard completely may fail to understand Cowboy's responses. There are of course workarounds. This chapter aims to cover them.</p> + +<h2 id="lowercase_headers">Lowercase headers</h2> + +<p>Cowboy converts all headers it receives to lowercase, and similarly sends back headers all in lowercase. Some broken HTTP clients have issues with that.</p> + +<p>A simple way to solve this is to create an <code>onresponse</code> hook that will format the header names with the expected case.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +capitalize_hook(Status, Headers, Body, Req) -> + Headers2 = [{cowboy_bstr:capitalize_token(N), V} + || {N, V} <- Headers], + {ok, Req2} = cowboy_req:reply(Status, Headers2, Body, Req), + Req2. +]]></script> + +<p>Note that SPDY clients do not have that particular issue because the specification explicitly says all headers are lowercase, unlike HTTP which allows any case but treats them as case insensitive.</p> + +<h2 id="camel-case_headers">Camel-case headers</h2> + +<p>Sometimes it is desirable to keep the actual case used by clients, for example when acting as a proxy between two broken implementations. There is no easy solution for this other than forking the project and editing the <code>cowboy_protocol</code> file directly.</p> + +<h2 id="chunked_transfer-encoding">Chunked transfer-encoding</h2> + +<p>Sometimes an HTTP client advertises itself as HTTP/1.1 but does not support chunked transfer-encoding. This is invalid behavior, as HTTP/1.1 clients are required to support it.</p> + +<p>A simple workaround exists in these cases. By changing the Req object response state to <code>waiting_stream</code>, Cowboy will understand that it must use the identity transfer-encoding when replying, just like if it was an HTTP/1.0 client.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set(resp_state, waiting_stream). +]]></script> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/cookies/index.html b/_build/static/docs/en/cowboy/1.0/guide/cookies/index.html new file mode 100644 index 00000000..fd9e0519 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/cookies/index.html @@ -0,0 +1,273 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Using cookies</span></h1> + +<p>Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.</p> + +<p>Cowboy provides facilities for handling cookies. It is highly recommended to use them instead of writing your own, as the implementation of cookies can vary greatly between clients.</p> + +<p>Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, including requests for static files. For this reason they can incur a cost which must be taken in consideration.</p> + +<p>Also consider that, regardless of the options used, cookies are not to be trusted. They may be read and modified by any program on the user's computer, but also by proxies. You should always validate cookie values before using them. Do not store any sensitive information in cookies either.</p> + +<p>When explicitly setting the domain, the cookie will be sent for the domain and all subdomains from that domain. Otherwise the current domain will be used. The same is true for the path.</p> + +<p>When the server sets cookies, they will only be available for requests that are sent after the client receives the response.</p> + +<p>Cookies are sent in HTTP headers, therefore they must have text values. It is your responsibility to encode any other data type. Also note that cookie names are de facto case sensitive.</p> + +<p>Cookies can be set for the client session (which generally means until the browser is closed), or it can be set for a number of seconds. Once it expires, or when the server says the cookie must exist for up to 0 seconds, the cookie is deleted by the client. To avoid this while the user is browsing your site, you should set the cookie for every request, essentially resetting the expiration time.</p> + +<p>Cookies can be restricted to secure channels. This typically means that such a cookie will only be sent over HTTPS, and that it will only be available by client-side scripts that run from HTTPS webpages.</p> + +<p>Finally, cookies can be restricted to HTTP and HTTPS requests, essentially disabling their access from client-side scripts.</p> + +<h2 id="setting_cookies">Setting cookies</h2> + +<p>By default, cookies you set are defined for the session.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +SessionID = generate_session_id(), +Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [], Req). +]]></script> + +<p>You can also make them expire at a specific point in the future.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +SessionID = generate_session_id(), +Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ + {max_age, 3600} +], Req). +]]></script> + +<p>You can delete cookies that have already been set. The value is ignored.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, <<>>, [ + {max_age, 0} +], Req). +]]></script> + +<p>You can restrict them to a specific domain and path. For example, the following cookie will be set for the domain <code>my.example.org</code> and all its subdomains, but only on the path <code>/account</code> and all its subdirectories.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set_resp_cookie(<<"inaccount">>, <<"1">>, [ + {domain, "my.example.org"}, + {path, "/account"} +], Req). +]]></script> + +<p>You can restrict the cookie to secure channels, typically HTTPS.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +SessionID = generate_session_id(), +Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ + {secure, true} +], Req). +]]></script> + +<p>You can restrict the cookie to client-server communication only. Such a cookie will not be available to client-side scripts.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +SessionID = generate_session_id(), +Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ + {http_only, true} +], Req). +]]></script> + +<p>Cookies may also be set client-side, for example using Javascript.</p> + +<h2 id="reading_cookies">Reading cookies</h2> + +<p>As we said, the client sends cookies with every request. But unlike the server, the client only sends the cookie name and value.</p> + +<p>You can read the value of a cookie.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{CookieVal, Req2} = cowboy_req:cookie(<<"lang">>, Req). +]]></script> + +<p>You can also get a default value returned when the cookie isn't set.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{CookieVal, Req2} = cowboy_req:cookie(<<"lang">>, Req, <<"fr">>). +]]></script> + +<p>And you can obtain all cookies at once as a list of key/value tuples.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{AllCookies, Req2} = cowboy_req:cookies(Req). +]]></script> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/erlang_beginners/index.html b/_build/static/docs/en/cowboy/1.0/guide/erlang_beginners/index.html new file mode 100644 index 00000000..b57aaf94 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/erlang_beginners/index.html @@ -0,0 +1,196 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Erlang for beginners</span></h1> + +<p>Chances are you are interested in using Cowboy, but have no idea how to write an Erlang program. Fear not! This chapter will help you get started.</p> + +<p>We recommend two books for beginners. You should read them both at some point, as they cover Erlang from two entirely different perspectives.</p> + +<h2 id="learn_you_some_erlang_for_great_good!">Learn You Some Erlang for Great Good!</h2> + +<p>The quickest way to get started with Erlang is by reading a book with the funny name of <a href="http://learnyousomeerlang.com">LYSE</a>, as we affectionately call it.</p> + +<p>It will get right into the syntax and quickly answer the questions a beginner would ask themselves, all the while showing funny pictures and making insightful jokes.</p> + +<p>You can read an early version of the book online for free, but you really should buy the much more refined paper and ebook versions.</p> + +<h2 id="programming_erlang">Programming Erlang</h2> + +<p>After writing some code, you will probably want to understand the very concepts that make Erlang what it is today. These are best explained by Joe Armstrong, the godfather of Erlang, in his book <a href="http://pragprog.com/book/jaerlang2/programming-erlang">Programming Erlang</a>.</p> + +<p>Instead of going into every single details of the language, Joe focuses on the central concepts behind Erlang, and shows you how they can be used to write a variety of different applications.</p> + +<p>At the time of writing, the 2nd edition of the book is in beta, and includes a few details about upcoming Erlang features that cannot be used today. Choose the edition you want, then get reading!</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/erlang_web/index.html b/_build/static/docs/en/cowboy/1.0/guide/erlang_web/index.html new file mode 100644 index 00000000..96ba79b1 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/erlang_web/index.html @@ -0,0 +1,248 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Erlang and the Web</span></h1> + +<h2 id="the_web_is_concurrent">The Web is concurrent</h2> + +<p>When you access a website there is little concurrency involved. A few connections are opened and requests are sent through these connections. Then the web page is displayed on your screen. Your browser will only open up to 4 or 8 connections to the server, depending on your settings. This isn't much.</p> + +<p>But think about it. You are not the only one accessing the server at the same time. There can be hundreds, if not thousands, if not millions of connections to the same server at the same time.</p> + +<p>Even today a lot of systems used in production haven't solved the C10K problem (ten thousand concurrent connections). And the ones who did are trying hard to get to the next step, C100K, and are pretty far from it.</p> + +<p>Erlang meanwhile has no problem handling millions of connections. At the time of writing there are application servers written in Erlang that can handle more than two million connections on a single server in a real production application, with spare memory and CPU!</p> + +<p>The Web is concurrent, and Erlang is a language designed for concurrency, so it is a perfect match.</p> + +<p>Of course, various platforms need to scale beyond a few million connections. This is where Erlang's built-in distribution mechanisms come in. If one server isn't enough, add more! Erlang allows you to use the same code for talking to local processes or to processes in other parts of your cluster, which means you can scale very quickly if the need arises.</p> + +<p>The Web has large userbases, and the Erlang platform was designed to work in a distributed setting, so it is a perfect match.</p> + +<p>Or is it? Surely you can find solutions to handle that many concurrent connections with your favorite language... But all these solutions will break down in the next few years. Why? Firstly because servers don't get any more powerful, they instead get a lot more cores and memory. This is only useful if your application can use them properly, and Erlang is light-years away from anything else in that area. Secondly, today your computer and your phone are online, tomorrow your watch, goggles, bike, car, fridge and tons of other devices will also connect to various applications on the Internet.</p> + +<p>Only Erlang is prepared to deal with what's coming.</p> + +<h2 id="the_web_is_soft_real_time">The Web is soft real time</h2> + +<p>What does soft real time mean, you ask? It means we want the operations done as quickly as possible, and in the case of web applications, it means we want the data propagated fast.</p> + +<p>In comparison, hard real time has a similar meaning, but also has a hard time constraint, for example an operation needs to be done in under N milliseconds otherwise the system fails entirely.</p> + +<p>Users aren't that needy yet, they just want to get access to their content in a reasonable delay, and they want the actions they make to register at most a few seconds after they submitted them, otherwise they'll start worrying about whether it successfully went through.</p> + +<p>The Web is soft real time because taking longer to perform an operation would be seen as bad quality of service.</p> + +<p>Erlang is a soft real time system. It will always run processes fairly, a little at a time, switching to another process after a while and preventing a single process to steal resources from all others. This means that Erlang can guarantee stable low latency of operations.</p> + +<p>Erlang provides the guarantees that the soft real time Web requires.</p> + +<h2 id="the_web_is_asynchronous">The Web is asynchronous</h2> + +<p>Long ago, the Web was synchronous because HTTP was synchronous. You fired a request, and then waited for a response. Not anymore. It all began when XmlHttpRequest started being used. It allowed the client to perform asynchronous calls to the server.</p> + +<p>Then Websocket appeared and allowed both the server and the client to send data to the other endpoint completely asynchronously. The data is contained within frames and no response is necessary.</p> + +<p>Erlang processes work the same. They send each other data contained within messages and then continue running without needing a response. They tend to spend most of their time inactive, waiting for a new message, and the Erlang VM happily activate them when one is received.</p> + +<p>It is therefore quite easy to imagine Erlang being good at receiving Websocket frames, which may come in at unpredictable times, pass the data to the responsible processes which are always ready waiting for new messages, and perform the operations required by only activating the required parts of the system.</p> + +<p>The more recent Web technologies, like Websocket of course, but also SPDY and HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order.</p> + +<p>Erlang is by nature asynchronous and really good at it thanks to the great engineering that has been done in the VM over the years. It's only natural that it's so good at dealing with the asynchronous Web.</p> + +<h2 id="the_web_is_omnipresent">The Web is omnipresent</h2> + +<p>The Web has taken a very important part of our lives. We're connected at all times, when we're on our phone, using our computer, passing time using a tablet while in the bathroom... And this isn't going to slow down, every single device at home or on us will be connected.</p> + +<p>All these devices are always connected. And with the number of alternatives to give you access to the content you seek, users tend to not stick around when problems arise. Users today want their applications to be always available and if it's having too many issues they just move on.</p> + +<p>Despite this, when developers choose a product to use for building web applications, their only concern seem to be "Is it fast?", and they look around for synthetic benchmarks showing which one is the fastest at sending "Hello world" with only a handful concurrent connections. Web benchmarks haven't been representative of reality in a long time, and are drifting further away as time goes on.</p> + +<p>What developers should really ask themselves is "Can I service all my users with no interruption?" and they'd find that they have two choices. They can either hope for the best, or they can use Erlang.</p> + +<p>Erlang is built for fault tolerance. When writing code in any other language, you have to check all the return values and act accordingly to avoid any unforeseen issues. If you're lucky, you won't miss anything important. When writing Erlang code, you can just check the success condition and ignore all errors. If an error happen, the Erlang process crashes and is then restarted by a special process called a supervisor.</p> + +<p>The Erlang developer thus has no need to fear about unhandled errors, and can focus on handling only the errors that should give some feedback to the user and let the system take care of the rest. This also has the advantage of allowing him to write a lot less code, and letting him sleep at night.</p> + +<p>Erlang's fault tolerance oriented design is the first piece of what makes it the best choice for the omnipresent, always available Web.</p> + +<p>The second piece is Erlang's built-in distribution. Distribution is a key part of building a fault tolerant system, because it allows you to handle bigger failures, like a whole server going down, or even a data center entirely.</p> + +<p>Fault tolerance and distribution are important today, and will be vital in the future of the Web. Erlang is ready.</p> + +<h2 id="erlang_is_the_ideal_platform_for_the_web">Erlang is the ideal platform for the Web</h2> + +<p>Erlang provides all the important features that the Web requires or will require in the near future. Erlang is a perfect match for the Web, and it only makes sense to use it to build web applications.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/getting_started/index.html b/_build/static/docs/en/cowboy/1.0/guide/getting_started/index.html new file mode 100644 index 00000000..810fd358 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/getting_started/index.html @@ -0,0 +1,299 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Getting started</span></h1> + +<p>Erlang is more than a language, it is also an operating system for your applications. Erlang developers rarely write standalone modules, they write libraries or applications, and then bundle those into what is called a release. A release contains the Erlang VM plus all applications required to run the node, so it can be pushed to production directly.</p> + +<p>This chapter walks you through all the steps of setting up Cowboy, writing your first application and generating your first release. At the end of this chapter you should know everything you need to push your first Cowboy application to production.</p> + +<h2 id="bootstrap">Bootstrap</h2> + +<p>We are going to use the <a href="https://github.com/ninenines/erlang.mk">erlang.mk</a> build system. It also offers bootstrap features allowing us to quickly get started without having to deal with minute details.</p> + +<p>First, let's create the directory for our application.</p> + +<script type="syntaxhighlighter" class="brush: bash"><![CDATA[ +$ mkdir hello_erlang +$ cd hello_erlang +]]></script> + +<p>Then we need to download <code>erlang.mk</code>. Either use the following command or download it manually.</p> + +<script type="syntaxhighlighter" class="brush: bash"><![CDATA[ +$ wget https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk +]]></script> + +<p>We can now bootstrap our application. Since we are going to generate a release, we will also bootstrap it at the same time.</p> + +<script type="syntaxhighlighter" class="brush: bash"><![CDATA[ +$ make -f erlang.mk bootstrap bootstrap-rel +]]></script> + +<p>This creates a Makefile, a base application, and the release files necessary for creating the release. We can already build and start this release.</p> + +<script type="syntaxhighlighter" class="brush: bash"><![CDATA[ +$ make +... +$ ./_rel/hello_erlang_release/bin/hello_erlang_release console +... +([email protected])1> +]]></script> + +<p>Entering the command <code>i().</code> will show the running processes, including one called <code>hello_erlang_sup</code>. This is the supervisor for our application.</p> + +<p>The release currently does nothing. In the rest of this chapter we will add Cowboy as a dependency and write a simple "Hello world!" handler.</p> + +<h2 id="cowboy_setup">Cowboy setup</h2> + +<p>To add Cowboy as a dependency to your application, you need to modify two files: the Makefile and the application resource file.</p> + +<p>Modifying the Makefile allows the build system to know it needs to fetch and compile Cowboy. To do that we simply need to add one line to our Makefile to make it look like this:</p> + +<script type="syntaxhighlighter" class="brush: plain"><![CDATA[ +PROJECT = hello_erlang +DEPS = cowboy +include erlang.mk +]]></script> + +<p>Modifying the application resource file, <code>src/hello_erlang.app.src</code>, allows the build system to know it needs to include Cowboy in the release and start it automatically. This is a different step because some dependencies are only needed during development.</p> + +<p>We are simply going to add <code>cowboy</code> to the list of <code>applications</code>, right after <code>stdlib</code>. Don't forget the comma separator.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{application, hello_erlang, [ + {description, "Hello Erlang!"}, + {vsn, "0.1.0"}, + {modules, []}, + {registered, []}, + {applications, [ + kernel, + stdlib, + cowboy + ]}, + {mod, {hello_erlang_app, []}}, + {env, []} +]}. +]]></script> + +<p>You may want to set a description for the application while you are editing the file.</p> + +<p>If you run <code>make</code> now and start the release, Cowboy will be included and started automatically. This is not enough however, as Cowboy doesn't do anything by default. We still need to tell Cowboy to listen for connections.</p> + +<h2 id="listening_for_connections">Listening for connections</h2> + +<p>We will do this when our application starts. It's a two step process. First we need to define and compile the dispatch list, a list of routes that Cowboy will use to map requests to handler modules. Then we tell Cowboy to listen for connections.</p> + +<p>Open the <code>src/hello_erlang_app.erl</code> file and add the necessary code to the <code>start/2</code> function to make it look like this:</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +start(_Type, _Args) -> + Dispatch = cowboy_router:compile([ + {'_', [{"/", hello_handler, []}]} + ]), + cowboy:start_http(my_http_listener, 100, [{port, 8080}], + [{env, [{dispatch, Dispatch}]}] + ), + hello_erlang_sup:start_link(). +]]></script> + +<p>The dispatch list is explained in great details in the <a href="/docs/en/cowboy/1.0/guide/routing">Routing</a> chapter. For this tutorial we map the path <code>/</code> to the handler module <code>hello_handler</code>. This module doesn't exist yet, we still have to write it.</p> + +<p>If you build the release, start it and open <a href="http://localhost:8080">http://localhost:8080</a> now, you will get an error because the module is missing. Any other URL, like <a href="http://localhost:8080/test">http://localhost:8080/test</a>, will result in a 404 error.</p> + +<h2 id="handling_requests">Handling requests</h2> + +<p>Cowboy features different kinds of handlers, including REST and Websocket handlers. For this tutorial we will use a plain HTTP handler.</p> + +<p>First, let's generate a handler from a template.</p> + +<script type="syntaxhighlighter" class="brush: bash"><![CDATA[ +$ make new t=cowboy_http n=hello_handler +]]></script> + +<p>You can then open the <code>src/hello_handler.erl</code> file and modify the <code>handle/2</code> function like this to send a reply.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +handle(Req, State=#state{}) -> + {ok, Req2} = cowboy_req:reply(200, + [{<<"content-type">>, <<"text/plain">>}], + <<"Hello Erlang!">>, + Req), + {ok, Req2, State}. +]]></script> + +<p>What the above code does is send a <code>200 OK</code> reply, with the <code>content-type</code> header set to <code>text/plain</code> and the response body set to <code>Hello Erlang!</code>.</p> + +<p>If you build the release, start it and open <a href="http://localhost:8080">http://localhost:8080</a> in your browser, you should get a nice <code>Hello Erlang!</code> displayed!</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/hooks/index.html b/_build/static/docs/en/cowboy/1.0/guide/hooks/index.html new file mode 100644 index 00000000..13079057 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/hooks/index.html @@ -0,0 +1,239 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Hooks</span></h1> + +<p>Cowboy provides two hooks. <code>onrequest</code> is called once the request line and headers have been received. <code>onresponse</code> is called just before sending the response.</p> + +<h2 id="onrequest">Onrequest</h2> + +<p>The <code>onrequest</code> hook is called as soon as Cowboy finishes fetching the request headers. It occurs before any other processing, including routing. It can be used to perform any modification needed on the request object before continuing with the processing. If a reply is sent inside this hook, then Cowboy will move on to the next request, skipping any subsequent handling.</p> + +<p>This hook is a function that takes a request object as argument, and returns a request object. This function MUST NOT crash. Cowboy will not send any reply if a crash occurs in this function.</p> + +<p>You can specify the <code>onrequest</code> hook when creating the listener, inside the request options.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy:start_http(my_http_listener, 100, + [{port, 8080}], + [ + {env, [{dispatch, Dispatch}]}, + {onrequest, fun ?MODULE:debug_hook/1} + ] +). +]]></script> + +<p>The following hook function prints the request object everytime a request is received. This can be useful for debugging, for example.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +debug_hook(Req) -> + erlang:display(Req), + Req. +]]></script> + +<p>Make sure to always return the last request object obtained.</p> + +<h2 id="onresponse">Onresponse</h2> + +<p>The <code>onresponse</code> hook is called right before sending the response to the socket. It can be used for the purposes of logging responses, or for modifying the response headers or body. The best example is providing custom error pages.</p> + +<p>Note that like the <code>onrequest</code> hook, this function MUST NOT crash. Cowboy may or may not send a reply if this function crashes. If a reply is sent, the hook MUST explicitly provide all headers that are needed.</p> + +<p>You can specify the <code>onresponse</code> hook when creating the listener.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy:start_http(my_http_listener, 100, + [{port, 8080}], + [ + {env, [{dispatch, Dispatch}]}, + {onresponse, fun ?MODULE:custom_404_hook/4} + ] +). +]]></script> + +<p>The following hook function will provide a custom body for 404 errors when it has not been provided before, and will let Cowboy proceed with the default response otherwise.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +custom_404_hook(404, Headers, <<>>, Req) -> + Body = <<"404 Not Found.">>, + Headers2 = lists:keyreplace(<<"content-length">>, 1, Headers, + {<<"content-length">>, integer_to_list(byte_size(Body))}), + {ok, Req2} = cowboy_req:reply(404, Headers2, Body, Req), + Req2; +custom_404_hook(_, _, _, Req) -> + Req. +]]></script> + +<p>Again, make sure to always return the last request object obtained.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/http_handlers/index.html b/_build/static/docs/en/cowboy/1.0/guide/http_handlers/index.html new file mode 100644 index 00000000..31a6c135 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/http_handlers/index.html @@ -0,0 +1,279 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Handling plain HTTP requests</span></h1> + +<p>The simplest way to handle a request is by writing a plain HTTP handler. It is modeled after Erlang/OTP's gen_server behaviour, although simplified, as Cowboy will simply call the three callbacks sequentially.</p> + +<h2 id="initialization">Initialization</h2> + +<p>The first callback, <code>init/3</code>, is common to all handlers, as it is used to identify the type of handler. Plain HTTP handlers just return <code>ok</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, _Opts) -> + {ok, Req, no_state}. +]]></script> + +<p>This function receives the name of the transport and protocol modules used for processing the request. They can be used to quickly dismiss requests. For example the following handler will crash when accessed using TCP instead of SSL.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init({ssl, _}, Req, _Opts) -> + {ok, Req, no_state}. +]]></script> + +<p>This function also receives the options associated with this route that you configured previously. If your handler does not use options, then it is recommended you match the value <code>[]</code> directly to quickly detect configuration errors.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, []) -> + {ok, Req, no_state}. +]]></script> + +<p>You do not need to validate the options unless they are user configured. If they are, and there's a configuration error, you may choose to crash. For example, this will crash if the required <code>lang</code> option is not found.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, Opts) -> + {_, _Lang} = lists:keyfind(lang, 1, Opts), + {ok, Req, no_state}. +]]></script> + +<p>If your users are unlikely to figure out the issue without explanations, then you should send a more meaningful error back to the user. Since we already replied to the user, there's no need for us to continue with the handler code, so we use the <code>shutdown</code> return value to stop early.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, Opts) -> + case lists:keyfind(lang, 1, Opts) of + false -> + {ok, Req2} = cowboy_req:reply(500, [ + {<<"content-type">>, <<"text/plain">>} + ], "Missing option 'lang'.", Req), + {shutdown, Req2, no_state}; + _ -> + {ok, Req, no_state} + end. +]]></script> + +<p>Once the options have been validated, we can use them safely. So we need to pass them onward to the rest of the handler. That's what the third element of the return tuple, the state, is for.</p> + +<p>We recommend that you create a state record for this. The record will make your handler code clearer and will allow you to better use Dialyzer for type checking.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +-record(state, { + lang :: en | fr + %% More fields here. +}). + +init(_Type, Req, Opts) -> + {_, Lang} = lists:keyfind(lang, 1, Opts), + {ok, Req, #state{lang=Lang}}. +]]></script> + +<h2 id="handling_the_request">Handling the request</h2> + +<p>The second callback, <code>handle/2</code>, is specific to plain HTTP handlers. It's where you, wait for it, handle the request.</p> + +<p>A handle function that does nothing would look like this:</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +handle(Req, State) -> + {ok, Req, State}. +]]></script> + +<p>There's no other return value. To obtain information about the request, or send a response, you would use the Req object here. The Req object is documented in its own chapter.</p> + +<p>The following handle function will send a fairly original response.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +handle(Req, State) -> + {ok, Req2} = cowboy_req:reply(200, [ + {<<"content-type">>, <<"text/plain">>} + ], <<"Hello World!">>, Req), + {ok, Req2, State}. +]]></script> + +<h2 id="cleaning_up">Cleaning up</h2> + +<p>The third and last callback, <code>terminate/3</code>, will most likely be empty in your handler.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +terminate(_Reason, Req, State) -> + ok. +]]></script> + +<p>This callback is strictly reserved for any required cleanup. You cannot send a response from this function. There is no other return value.</p> + +<p>If you used the process dictionary, timers, monitors or may be receiving messages, then you can use this function to clean them up, as Cowboy might reuse the process for the next keep-alive request.</p> + +<p>The chances of any of this happening in your handler are pretty thin however. The use of the process dictionary is discouraged in Erlang code in general. And if you need to use timers, monitors or to receive messages, you are better off with a loop handler, a different kind of handler meant specifically for this use.</p> + +<p>This function is still available should you need it. It will always be called.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/http_req_life/index.html b/_build/static/docs/en/cowboy/1.0/guide/http_req_life/index.html new file mode 100644 index 00000000..90d5d466 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/http_req_life/index.html @@ -0,0 +1,251 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>The life of a request</span></h1> + +<p>This chapter explains the different steps a request goes through until a response is sent, along with details of the Cowboy implementation.</p> + +<h2 id="request/response">Request/response</h2> + +<p>As you already know, HTTP clients connect to the server and send a request for a resource; the server then sends a response containing the resource if it could obtain it.</p> + +<p>Before the server can send the resource, however, it needs to perform many different operations to read the request, find the resource, prepare the response being sent and often other related operations the user can add like writing logs.</p> + +<p>Requests take the following route in Cowboy:</p> + +<p><img title="HTTP request/response flowchart" src="/docs/en/cowboy/1.0/guide/http_req_resp.png"/></p> + +<p>This shows the default middlewares, but they may be configured differently in your setup. The dark green indicates the points where you can hook your own code, the light green is the Cowboy code that you can of course configure as needed.</p> + +<p>The <code>acceptor</code> is the part of the server that accepts the connection and create an Erlang process to handle it. The <code>parser</code> then starts reading from the socket and handling requests as they come until the socket is closed.</p> + +<p>A response may be sent at many different points in the life of the request. If Cowboy can't parse the request, it gives up with an error response. If the router can't find the resource, it sends a not found error. Your own code can of course send a response at any time.</p> + +<p>When a response is sent, you can optionally modify it or act upon it by enabling the <code>onresponse</code> hook. By default the response is sent directly to the client.</p> + +<h2 id="and_then?">And then?</h2> + +<p>Behavior depends on what protocol is in use.</p> + +<p>HTTP/1.0 can only process one request per connection, so Cowboy will close the connection immediately after it sends the response.</p> + +<p>HTTP/1.1 allows the client to request that the server keeps the connection alive. This mechanism is described in the next section.</p> + +<p>SPDY is designed to allow sending multiple requests asynchronously on the same connection. Details on what this means for your application is described in this chapter.</p> + +<h2 id="keep-alive_(http/1.1)">Keep-alive (HTTP/1.1)</h2> + +<p>With HTTP/1.1, the connection may be left open for subsequent requests to come. This mechanism is called <code>keep-alive</code>.</p> + +<p>When the client sends a request to the server, it includes a header indicating whether it would like to leave the socket open. The server may or may not accept, indicating its choice by sending the same header in the response.</p> + +<p>Cowboy will include this header automatically in all responses to HTTP/1.1 requests. You can however force the closing of the socket if you want. When Cowboy sees you want to send a <code>connection: close</code> header, it will not override it and will close the connection as soon as the reply is sent.</p> + +<p>This snippet will force Cowboy to close the connection.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(200, [ + {<<"connection">>, <<"close">>}, +], <<"Closing the socket in 3.. 2.. 1..">>, Req). +]]></script> + +<p>Cowboy will only accept a certain number of new requests on the same connection. By default it will run up to 100 requests. This number can be changed by setting the <code>max_keepalive</code> configuration value when starting an HTTP listener.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy:start_http(my_http_listener, 100, [{port, 8080}], [ + {env, [{dispatch, Dispatch}]}, + {max_keepalive, 5} +]). +]]></script> + +<p>Cowboy implements the keep-alive mechanism by reusing the same process for all requests. This allows Cowboy to save memory. This works well because most code will not have any side effect impacting subsequent requests. But it also means you need to clean up if you do have code with side effects. The <code>terminate/3</code> function can be used for this purpose.</p> + +<h2 id="pipelining_(http/1.1)">Pipelining (HTTP/1.1)</h2> + +<p>While HTTP is designed as a sequential protocol, with the client sending a request and then waiting for the response from the server, nothing prevents the client from sending more requests to the server without waiting for the response, due to how sockets work. The server still handles the requests sequentially and sends the responses in the same order.</p> + +<p>This mechanism is called pipelining. It allows reducing latency when a client needs to request many resources at the same time. This is used by browsers when requesting static files for example.</p> + +<p>This is handled automatically by the server.</p> + +<h2 id="asynchronous_requests_(spdy)">Asynchronous requests (SPDY)</h2> + +<p>In SPDY, the client can send a request at any time. And the server can send a response at any time too.</p> + +<p>This means for example that the client does not need to wait for a request to be fully sent to send another, it is possible to interleave a request with the request body of another request. The same is true with responses. Responses may also be sent in a different order.</p> + +<p>Because requests and responses are fully asynchronous, Cowboy creates a new process for each request, and these processes are managed by another process that handles the connection itself.</p> + +<p>SPDY servers may also decide to send resources to the client before the client requests them. This is especially useful for sending static files associated with the HTML page requested, as this reduces the latency of the overall response. Cowboy does not support this particular mechanism at this point, however.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.png b/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.png Binary files differnew file mode 100644 index 00000000..e38935f3 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.svg b/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.svg new file mode 100644 index 00000000..0cfa0ae9 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/http_req_resp.svg @@ -0,0 +1,558 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="http_req_resp.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="229.71447" + inkscape:cy="764.83183" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1920" + inkscape:window-height="1014" + inkscape:window-x="0" + inkscape:window-y="33" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <use + x="0" + y="0" + xlink:href="#path5757" + id="use5779" + transform="matrix(0.59961275,-0.80029029,0.80029029,0.59961275,-103.8895,437.48518)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#path5757" + id="use5777" + transform="matrix(0.92125726,-0.38895379,0.38895379,0.92125726,-85.14742,176.0134)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <path + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0" + d="m 188.5,231.36218 187,79" + id="path5757" + inkscape:connector-curvature="0" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#g5650" + id="use5753" + transform="translate(475.11201,-33.017248)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5753" + id="use5755" + transform="translate(3.984568e-6,86.977569)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279908999999984;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="43.721401" + y="360.88528" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#g5650" + id="use5654" + transform="translate(205.03261,53.351708)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5656" + id="use5658" + transform="translate(0,-86.13396)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5658" + id="use5660" + transform="translate(0,-87.519558)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5660" + id="use5662" + transform="translate(0,-86.562562)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;opacity:0.8" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;opacity:0.8" + sodipodi:type="star" /> + </g> + <use + x="0" + y="0" + xlink:href="#use5654" + id="use5656" + transform="translate(6.1542801e-7,-87.19819)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273" + id="use5335" + transform="translate(318.97597,268.31614)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(318.97592,-176.5)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#rect5273-7" + id="use5359" + transform="translate(318.97597,32.954225)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5359" + id="use5361" + transform="translate(1.630859e-6,86.769591)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5335" + id="use5363" + transform="translate(0,173.33215)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5361" + id="use5365" + transform="translate(0,173.66424)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="146.77734" + y="147.73293" + id="text5371-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="146.77734" + y="147.73293">acceptor</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="146.53125" + y="233.42836" + id="text5371-74" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-5" + x="146.53125" + y="233.42836">parser</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="146.53125" + y="407.78009" + id="text5371-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-0" + x="146.53125" + y="407.78009">router</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.00391" + y="321.39722" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="147.00391" + y="321.39722">onrequest</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="146.53125" + y="495.07318" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="146.53125" + y="495.07318">handler</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-446.99591" + y="63.078125" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-446.99591" + y="63.078125">middlewares</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.00391" + y="60.912468" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2" + x="147.00391" + y="60.912468">client</tspan></text> + <use + x="0" + y="0" + xlink:href="#rect5273-7" + id="use5668" + transform="translate(589.05532,207.03588)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#rect5273" + id="use5670" + transform="translate(589.05538,355.27934)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#use5355" + id="use5672" + transform="translate(270.07946,434.91762)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <use + x="0" + y="0" + xlink:href="#text5371-4-0" + id="use5674" + transform="translate(270.29655,434.16115)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="417.30829" + y="321.42792" + id="text5371-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-57" + x="417.30829" + y="321.42792">reply</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="417.30829" + y="407.77994" + id="text5371-2-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="417.30829" + y="407.77994">onresponse</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/index.html b/_build/static/docs/en/cowboy/1.0/guide/index.html new file mode 100644 index 00000000..f03e8f67 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/index.html @@ -0,0 +1,250 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Cowboy User Guide</span></h1> + +<p>The Cowboy User Guide explores the modern Web and how to make best use of Cowboy for writing powerful web applications.</p> + +<h2 id="introducing_cowboy">Introducing Cowboy</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/introduction">Introduction</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/modern_web">The modern Web</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/erlang_web">Erlang and the Web</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/erlang_beginners">Erlang for beginners</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/getting_started">Getting started</a></li> +</ul> + +<h2 id="http">HTTP</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/http_req_life">The life of a request</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/routing">Routing</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/http_handlers">Handling plain HTTP requests</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/req">The Req object</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/req_body">Reading the request body</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/resp">Sending a response</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/cookies">Using cookies</a></li> +</ul> + +<h2 id="multipart">Multipart</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/multipart_intro">Introduction to multipart</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/multipart_req">Multipart requests</a></li> +</ul> + +<h2 id="static_files">Static files</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/static_handlers">Static handler</a></li> +</ul> + +<h2 id="rest">REST</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/rest_principles">REST principles</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/rest_handlers">Handling REST requests</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/rest_flowcharts">REST flowcharts</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/resource_design">Designing a resource handler</a></li> +</ul> + +<h2 id="websocket">Websocket</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/ws_protocol">The Websocket protocol</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/ws_handlers">Handling Websocket connections</a></li> +</ul> + +<h2 id="server_push">Server push</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/loop_handlers">Loop handlers</a></li> +</ul> + +<h2 id="pluggable_interface">Pluggable interface</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/middlewares">Middlewares</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/upgrade_protocol">Protocol upgrades</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/hooks">Hooks</a></li> +</ul> + +<h2 id="internals">Internals</h2> + +<ul> +<li><a href="/docs/en/cowboy/1.0/guide/architecture">Architecture</a></li> +<li><a href="/docs/en/cowboy/1.0/guide/broken_clients">Dealing with broken clients</a></li> +</ul> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/introduction/index.html b/_build/static/docs/en/cowboy/1.0/guide/introduction/index.html new file mode 100644 index 00000000..fa7f48f5 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/introduction/index.html @@ -0,0 +1,212 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Introduction</span></h1> + +<p>Cowboy is a small, fast and modular HTTP server written in Erlang.</p> + +<p>Cowboy aims to provide a complete HTTP stack, including its derivatives SPDY, Websocket and REST. Cowboy currently supports HTTP/1.0, HTTP/1.1, Websocket (all implemented drafts + standard) and Webmachine-based REST.</p> + +<p>Cowboy is a high quality project. It has a small code base, is very efficient (both in latency and memory use) and can easily be embedded in another application.</p> + +<p>Cowboy is clean Erlang code. It includes hundreds of tests and its code is fully compliant with the Dialyzer. It is also well documented and features both a Function Reference and a User Guide.</p> + +<h2 id="prerequisites">Prerequisites</h2> + +<p>No Erlang knowledge is required for reading this guide. The reader will be introduced to Erlang concepts and redirected to reference material whenever necessary.</p> + +<p>Knowledge of the HTTP protocol is recommended but not required, as it will be detailed throughout the guide.</p> + +<h2 id="supported_platforms">Supported platforms</h2> + +<p>Cowboy is tested and supported on Linux.</p> + +<p>Cowboy has been reported to work on other platforms, but we make no guarantee that the experience will be safe and smooth. You are advised to perform the necessary testing and security audits prior to deploying on other platforms.</p> + +<p>Cowboy is developed for Erlang/OTP R16B01, R16B02, R16B03-1, 17.0 and 17.1.2.</p> + +<p>Cowboy may be compiled on other Erlang versions with small source code modifications but there is no guarantee that it will work as expected.</p> + +<h2 id="versioning">Versioning</h2> + +<p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p> + +<h2 id="conventions">Conventions</h2> + +<p>In the HTTP protocol, the method name is case sensitive. All standard method names are uppercase.</p> + +<p>Header names are case insensitive. Cowboy converts all the request header names to lowercase, and expects your application to provide lowercase header names in the response.</p> + +<p>The same applies to any other case insensitive value.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/loop_handlers/index.html b/_build/static/docs/en/cowboy/1.0/guide/loop_handlers/index.html new file mode 100644 index 00000000..d9d1bb30 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/loop_handlers/index.html @@ -0,0 +1,264 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Loop handlers</span></h1> + +<p>Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send a response.</p> + +<p>Loop handlers are used for requests where a response might not be immediately available, but where you would like to keep the connection open for a while in case the response arrives. The most known example of such practice is known as long-polling.</p> + +<p>Loop handlers can also be used for requests where a response is partially available and you need to stream the response body while the connection is open. The most known example of such practice is known as server-sent events.</p> + +<p>While the same can be accomplished using plain HTTP handlers, it is recommended to use loop handlers because they are well-tested and allow using built-in features like hibernation and timeouts.</p> + +<p>Loop handlers essentially wait for one or more Erlang messages and feed these messages to the <code>info/3</code> callback. It also features the <code>init/3</code> and <code>terminate/3</code> callbacks which work the same as for plain HTTP handlers.</p> + +<h2 id="initialization">Initialization</h2> + +<p>The <code>init/3</code> function must return a <code>loop</code> tuple to enable loop handler behavior. This tuple may optionally contain a timeout value and/or the atom <code>hibernate</code> to make the process enter hibernation until a message is received.</p> + +<p>This snippet enables the loop handler.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, _Opts) -> + {loop, Req, undefined_state}. +]]></script> + +<p>However it is largely recommended that you set a timeout value. The next example sets a timeout value of 30s and also makes the process hibernate.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, _Opts) -> + {loop, Req, undefined_state, 30000, hibernate}. +]]></script> + +<h2 id="receive_loop">Receive loop</h2> + +<p>Once initialized, Cowboy will wait for messages to arrive in the process' mailbox. When a message arrives, Cowboy calls the <code>info/3</code> function with the message, the Req object and the handler's state.</p> + +<p>The following snippet sends a reply when it receives a <code>reply</code> message from another process, or waits for another message otherwise.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +info({reply, Body}, Req, State) -> + {ok, Req2} = cowboy_req:reply(200, [], Body, Req), + {ok, Req2, State}; +info(_Msg, Req, State) -> + {loop, Req, State, hibernate}. +]]></script> + +<p>Do note that the <code>reply</code> tuple here may be any message and is simply an example.</p> + +<p>This callback may perform any necessary operation including sending all or parts of a reply, and will subsequently return a tuple indicating if more messages are to be expected.</p> + +<p>The callback may also choose to do nothing at all and just skip the message received.</p> + +<p>If a reply is sent, then the <code>ok</code> tuple should be returned. This will instruct Cowboy to end the request.</p> + +<p>Otherwise a <code>loop</code> tuple should be returned.</p> + +<h2 id="streaming_loop">Streaming loop</h2> + +<p>Another common case well suited for loop handlers is streaming data received in the form of Erlang messages. This can be done by initiating a chunked reply in the <code>init/3</code> callback and then using <code>cowboy_req:chunk/2</code> every time a message is received.</p> + +<p>The following snippet does exactly that. As you can see a chunk is sent every time a <code>chunk</code> message is received, and the loop is stopped by sending an <code>eof</code> message.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, _Opts) -> + {ok, Req2} = cowboy_req:chunked_reply(200, [], Req), + {loop, Req2, undefined_state}. + +info(eof, Req, State) -> + {ok, Req, State}; +info({chunk, Chunk}, Req, State) -> + ok = cowboy_req:chunk(Chunk, Req), + {loop, Req, State}; +info(_Msg, Req, State) -> + {loop, Req, State}. +]]></script> + +<h2 id="cleaning_up">Cleaning up</h2> + +<p>It is recommended that you set the connection header to <code>close</code> when replying, as this process may be reused for a subsequent request.</p> + +<p>Please refer to the <a href="/docs/en/cowboy/1.0/guide/http_handlers">HTTP handlers chapter</a> for general instructions about cleaning up.</p> + +<h2 id="timeout">Timeout</h2> + +<p>By default Cowboy will not attempt to close the connection if there is no activity from the client. This is not always desirable, which is why you can set a timeout. Cowboy will close the connection if no data was received from the client after the configured time. The timeout only needs to be set once and can't be modified afterwards.</p> + +<p>Because the request may have had a body, or may be followed by another request, Cowboy is forced to buffer all data it receives. This data may grow to become too large though, so there is a configurable limit for it. The default buffer size is of 5000 bytes, but it may be changed by setting the <code>loop_max_buffer</code> middleware environment value.</p> + +<h2 id="hibernate">Hibernate</h2> + +<p>To save memory, you may hibernate the process in between messages received. This is done by returning the atom <code>hibernate</code> as part of the <code>loop</code> tuple callbacks normally return. Just add the atom at the end and Cowboy will hibernate accordingly.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/middlewares/index.html b/_build/static/docs/en/cowboy/1.0/guide/middlewares/index.html new file mode 100644 index 00000000..42410512 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/middlewares/index.html @@ -0,0 +1,226 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Middlewares</span></h1> + +<p>Cowboy delegates the request processing to middleware components. By default, two middlewares are defined, for the routing and handling of the request, as is detailed in most of this guide.</p> + +<p>Middlewares give you complete control over how requests are to be processed. You can add your own middlewares to the mix or completely change the chain of middlewares as needed.</p> + +<p>Cowboy will execute all middlewares in the given order, unless one of them decides to stop processing.</p> + +<h2 id="usage">Usage</h2> + +<p>Middlewares only need to implement a single callback: <code>execute/2</code>. It is defined in the <code>cowboy_middleware</code> behavior.</p> + +<p>This callback has two arguments. The first is the <code>Req</code> object. The second is the environment.</p> + +<p>Middlewares can return one of four different values:</p> + +<ul> +<li><code>{ok, Req, Env}</code> to continue the request processing</li> +<li><code>{suspend, Module, Function, Args}</code> to hibernate</li> +<li><code>{halt, Req}</code> to stop processing and move on to the next request</li> +<li><code>{error, StatusCode, Req}</code> to reply an error and close the socket</li> +</ul> + +<p>Of note is that when hibernating, processing will resume on the given MFA, discarding all previous stacktrace. Make sure you keep the <code>Req</code> and <code>Env</code> in the arguments of this MFA for later use.</p> + +<p>If an error happens during middleware processing, Cowboy will not try to send an error back to the socket, the process will just crash. It is up to the middleware to make sure that a reply is sent if something goes wrong.</p> + +<h2 id="configuration">Configuration</h2> + +<p>The middleware environment is defined as the <code>env</code> protocol option. In the previous chapters we saw it briefly when we needed to pass the routing information. It is a list of tuples with the first element being an atom and the second any Erlang term.</p> + +<p>Two values in the environment are reserved:</p> + +<ul> +<li><code>listener</code> contains the name of the listener</li> +<li><code>result</code> contains the result of the processing</li> +</ul> + +<p>The <code>listener</code> value is always defined. The <code>result</code> value can be set by any middleware. If set to anything other than <code>ok</code>, Cowboy will not process any subsequent requests on this connection.</p> + +<p>The middlewares that come with Cowboy may define or require other environment values to perform.</p> + +<p>You can update the environment by calling the <code>cowboy:set_env/3</code> convenience function, adding or replacing a value in the environment.</p> + +<h2 id="routing_middleware">Routing middleware</h2> + +<p>The routing middleware requires the <code>dispatch</code> value. If routing succeeds, it will put the handler name and options in the <code>handler</code> and <code>handler_opts</code> values of the environment, respectively.</p> + +<h2 id="handler_middleware">Handler middleware</h2> + +<p>The handler middleware requires the <code>handler</code> and <code>handler_opts</code> values. It puts the result of the request handling into <code>result</code>.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/modern_web/index.html b/_build/static/docs/en/cowboy/1.0/guide/modern_web/index.html new file mode 100644 index 00000000..1aaba0a0 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/modern_web/index.html @@ -0,0 +1,282 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>The modern Web</span></h1> + +<p>Let's take a look at various technologies from the beginnings of the Web up to this day, and get a preview of what's coming next.</p> + +<p>Cowboy is compatible with all the technology cited in this chapter except of course HTTP/2.0 which has no implementation in the wild at the time of writing.</p> + +<h2 id="the_prehistoric_web">The prehistoric Web</h2> + +<p>HTTP was initially created to serve HTML pages and only had the GET method for retrieving them. This initial version is documented and is sometimes called HTTP/0.9. HTTP/1.0 defined the GET, HEAD and POST methods, and was able to send data with POST requests.</p> + +<p>HTTP/1.0 works in a very simple way. A TCP connection is first established to the server. Then a request is sent. Then the server sends a response back and closes the connection.</p> + +<p>Suffice to say, HTTP/1.0 is not very efficient. Opening a TCP connection takes some time, and pages containing many assets load much slower than they could because of this.</p> + +<p>Most improvements done in recent years focused on reducing this load time and reducing the latency of the requests.</p> + +<h2 id="http/1.1">HTTP/1.1</h2> + +<p>HTTP/1.1 quickly followed and added a keep-alive mechanism to allow using the same connection for many requests, as well as streaming capabilities, allowing an endpoint to send a body in well defined chunks.</p> + +<p>HTTP/1.1 defines the OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE and CONNECT methods. The PATCH method was added in more recent years. It also improves the caching capabilities with the introduction of many headers.</p> + +<p>HTTP/1.1 still works like HTTP/1.0 does, except the connection can be kept alive for subsequent requests. This however allows clients to perform what is called as pipelining: sending many requests in a row, and then processing the responses which will be received in the same order as the requests.</p> + +<h2 id="rest">REST</h2> + +<p>The design of HTTP/1.1 was influenced by the REST architectural style. REST, or REpresentational State Transfer, is a style of architecture for loosely connected distributed systems.</p> + +<p>REST defines constraints that systems must obey to in order to be RESTful. A system which doesn't follow all the constraints cannot be considered RESTful.</p> + +<p>REST is a client-server architecture with a clean separation of concerns between the client and the server. They communicate by referencing resources. Resources can be identified, but also manipulated. A resource representation has a media type and information about whether it can be cached and how. Hypermedia determines how resources are related and how they can be used. REST is also stateless. All requests contain the complete information necessary to perform the action.</p> + +<p>HTTP/1.1 defines all the methods, headers and semantics required to implement RESTful systems.</p> + +<p>REST is most often used when designing web application APIs which are generally meant to be used by executable code directly.</p> + +<h2 id="xmlhttprequest">XmlHttpRequest</h2> + +<p>Also know as AJAX, this technology allows Javascript code running on a web page to perform asynchronous requests to the server. This is what started the move from static websites to dynamic web applications.</p> + +<p>XmlHttpRequest still performs HTTP requests under the hood, and then waits for a response, but the Javascript code can continue to run until the response arrives. It will then receive the response through a callback previously defined.</p> + +<p>This is of course still requests initiated by the client, the server still had no way of pushing data to the client on its own, so new technology appeared to allow that.</p> + +<h2 id="long-polling">Long-polling</h2> + +<p>Polling was a technique used to overcome the fact that the server cannot push data directly to the client. Therefore the client had to repeatedly create a connection, make a request, get a response, then try again a few seconds later. This is overly expensive and adds an additional delay before the client receives the data.</p> + +<p>Polling was necessary to implement message queues and other similar mechanisms, where a user must be informed of something when it happens, rather than when he refreshes the page next. A typical example would be a chat application.</p> + +<p>Long-polling was created to reduce the server load by creating less connections, but also to improve latency by getting the response back to the client as soon as it becomes available on the server.</p> + +<p>Long-polling works in a similar manner to polling, except the request will not get a response immediately. Instead the server leaves it open until it has a response to send. After getting the response, the client creates a new request and gets back to waiting.</p> + +<p>You probably guessed by now that long-polling is a hack, and like most hacks it can suffer from unforeseen issues, in this case it doesn't always play well with proxies.</p> + +<h2 id="html5">HTML5</h2> + +<p>HTML5 is, of course, the HTML version after HTML4. But HTML5 emerged to solve a specific problem: dynamic web applications.</p> + +<p>HTML was initially created to write web pages which compose a website. But soon people and companies wanted to use HTML to write more and more complex websites, eventually known as web applications. They are for example your news reader, your email client in the browser, or your video streaming website.</p> + +<p>Because HTML wasn't enough, they started using proprietary solutions, often implemented using plug-ins. This wasn't perfect of course, but worked well enough for most people.</p> + +<p>However, the needs for a standard solution eventually became apparent. The browser needed to be able to play media natively. It needed to be able to draw anything. It needed an efficient way of streaming events to the server, but also receiving events from the server.</p> + +<p>The solution went on to become HTML5. At the time of writing it is being standardized.</p> + +<h2 id="eventsource">EventSource</h2> + +<p>EventSource, sometimes also called Server-Sent Events, is a technology allowing servers to push data to HTML5 applications.</p> + +<p>EventSource is one-way communication channel from the server to the client. The client has no means to talk to the server other than by using HTTP requests.</p> + +<p>It consists of a Javascript object allowing setting up an EventSource connection to the server, and a very small protocol for sending events to the client on top of the HTTP/1.1 connection.</p> + +<p>EventSource is a lightweight solution that only works for UTF-8 encoded text data. Binary data and text data encoded differently are not allowed by the protocol. A heavier but more generic approach can be found in Websocket.</p> + +<h2 id="websocket">Websocket</h2> + +<p>Websocket is a protocol built on top of HTTP/1.1 that provides a two-ways communication channel between the client and the server. Communication is asynchronous and can occur concurrently.</p> + +<p>It consists of a Javascript object allowing setting up a Websocket connection to the server, and a binary based protocol for sending data to the server or the client.</p> + +<p>Websocket connections can transfer either UTF-8 encoded text data or binary data. The protocol also includes support for implementing a ping/pong mechanism, allowing the server and the client to have more confidence that the connection is still alive.</p> + +<p>A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems.</p> + +<h2 id="spdy">SPDY</h2> + +<p>SPDY is an attempt to reduce page loading time by opening a single connection per server, keeping it open for subsequent requests, and also by compressing the HTTP headers to reduce the size of requests.</p> + +<p>SPDY is compatible with HTTP/1.1 semantics, and is actually just a different way of performing HTTP requests and responses, by using binary frames instead of a text-based protocol. SPDY also allows the server to send extra responses following a request. This is meant to allow sending the resources associated with the request before the client requests them, saving latency when loading websites.</p> + +<p>SPDY is an experiment that has proven successful and is used as the basis for the HTTP/2.0 standard.</p> + +<p>Browsers make use of TLS Next Protocol Negotiation to upgrade to a SPDY connection seamlessly if the protocol supports it.</p> + +<p>The protocol itself has a few shortcomings which are being fixed in HTTP/2.0.</p> + +<h2 id="http/2.0">HTTP/2.0</h2> + +<p>HTTP/2.0 is the long-awaited update to the HTTP/1.1 protocol. It is based on SPDY although a lot has been improved at the time of writing.</p> + +<p>HTTP/2.0 is an asynchronous two-ways communication channel between two endpoints.</p> + +<p>It is planned to be ready late 2014.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/multipart_intro/index.html b/_build/static/docs/en/cowboy/1.0/guide/multipart_intro/index.html new file mode 100644 index 00000000..3a2f5273 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/multipart_intro/index.html @@ -0,0 +1,198 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Introduction to multipart</span></h1> + +<p>Multipart originates from MIME, an Internet standard that extends the format of emails. Multipart messages are a container for parts of any content-type.</p> + +<p>For example, a multipart message may have a part containing text and a second part containing an image. This is what allows you to attach files to emails.</p> + +<p>In the context of HTTP, multipart is most often used with the <code>multipart/form-data</code> content-type. This is the content-type you have to use when you want browsers to be allowed to upload files through HTML forms.</p> + +<p>Multipart is of course not required for uploading files, it is only required when you want to do so through HTML forms.</p> + +<h2 id="structure">Structure</h2> + +<p>A multipart message is a list of parts. Parts may contain either a multipart message or a non-multipart content-type. This allows parts to be arranged in a tree structure, although this is a rare case as far as the Web is concerned.</p> + +<h2 id="form-data">Form-data</h2> + +<p>In the normal case, when a form is submitted, the browser will use the <code>application/x-www-form-urlencoded</code> content-type. This type is just a list of keys and values and is therefore not fit for uploading files.</p> + +<p>That's where the <code>multipart/form-data</code> content-type comes in. When the form is configured to use this content-type, the browser will use one part of the message for each form field. This means that a file input field will be sent in its own part, but the same applies to all other kinds of fields.</p> + +<p>A form with a text input, a file input and a select choice box will result in a multipart message with three parts, one for each field.</p> + +<p>The browser does its best to determine the content-type of the files it sends this way, but you should not rely on it for determining the contents of the file. Proper investigation of the contents is recommended.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/multipart_req/index.html b/_build/static/docs/en/cowboy/1.0/guide/multipart_req/index.html new file mode 100644 index 00000000..f6301d83 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/multipart_req/index.html @@ -0,0 +1,261 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Multipart requests</span></h1> + +<p>You can read and parse multipart messages using the Req object directly.</p> + +<p>Cowboy defines two functions that allows you to get information about each part and read their contents.</p> + +<h2 id="checking_the_content-type">Checking the content-type</h2> + +<p>While there is a variety of multipart messages, the most common on the Web is <code>multipart/form-data</code>. It's the type of message being sent when an HTML form allows uploading files.</p> + +<p>You can quickly figure out if a multipart message has been sent by parsing the <code>content-type</code> header.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, {<<"multipart">>, <<"form-data">>, _}, Req2} + = cowboy_req:parse_header(<<"content-type">>, Req). +]]></script> + +<h2 id="reading_a_multipart_message">Reading a multipart message</h2> + +<p>To read a message you have to iterate over all its parts. Then, for each part, you can inspect its headers and read its body.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +multipart(Req) -> + case cowboy_req:part(Req) of + {ok, _Headers, Req2} -> + {ok, _Body, Req3} = cowboy_req:part_body(Req2), + multipart(Req3); + {done, Req2} -> + Req2 + end. +]]></script> + +<p>Parts do not have a size limit. When a part body is too big, Cowboy will return what it read so far and allow you to continue if you wish to do so.</p> + +<p>The function <code>cow_multipart:form_data/1</code> can be used to quickly obtain information about a part from a <code>multipart/form-data</code> message. This function will tell you if the part is for a normal field or if it is a file being uploaded.</p> + +<p>This can be used for example to allow large part bodies for files but crash when a normal field is too large.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +multipart(Req) -> + case cowboy_req:part(Req) of + {ok, Headers, Req2} -> + Req4 = case cow_multipart:form_data(Headers) of + {data, _FieldName} -> + {ok, _Body, Req3} = cowboy_req:part_body(Req2), + Req3; + {file, _FieldName, _Filename, _CType, _CTransferEncoding} -> + stream_file(Req2) + end, + multipart(Req4); + {done, Req2} -> + Req2 + end. + +stream_file(Req) -> + case cowboy_req:part_body(Req) of + {ok, _Body, Req2} -> + Req2; + {more, _Body, Req2} -> + stream_file(Req2) + end. +]]></script> + +<p>By default the body chunk Cowboy will return is limited to 8MB. This can of course be overriden. Both functions can take a second argument, the same list of options that will be passed to <code>cowboy_req:body/2</code> function.</p> + +<h2 id="skipping_unwanted_parts">Skipping unwanted parts</h2> + +<p>If you do not want to read a part's body, you can skip it. Skipping is easy. If you do not call the function to read the part's body, Cowboy will automatically skip it when you request the next part.</p> + +<p>The following snippet reads all part headers and skips all bodies:</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +multipart(Req) -> + case cowboy_req:part(Req) of + {ok, _Headers, Req2} -> + multipart(Req2); + {done, Req2} -> + Req2 + end. +]]></script> + +<p>Similarly, if you start reading the body and it ends up being too big, you can simply continue with the next part, Cowboy will automatically skip what remains.</p> + +<p>Note that the skipping rate may not be adequate for your application. If you observe poor performance when skipping, you might want to consider manually skipping by calling the <code>cowboy_req:part_body/1</code> function directly.</p> + +<p>And if you started reading the message but decide that you do not need the remaining parts, you can simply stop reading entirely and Cowboy will automatically figure out what to do.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/req/index.html b/_build/static/docs/en/cowboy/1.0/guide/req/index.html new file mode 100644 index 00000000..0b8bb586 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/req/index.html @@ -0,0 +1,390 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>The Req object</span></h1> + +<p>The Req object is this variable that you will use to obtain information about a request, read the body of the request and send a response.</p> + +<h2 id="a_special_variable">A special variable</h2> + +<p>While we call it an "object", it is not an object in the OOP sense of the term. In fact it is completely opaque to you and the only way you can perform operations using it is by calling the functions from the <code>cowboy_req</code> module.</p> + +<p>Almost all the calls to the <code>cowboy_req</code> module will return an updated request object. Just like you would keep the updated <code>State</code> variable in a gen_server, you MUST keep the updated <code>Req</code> variable in a Cowboy handler. Cowboy will use this object to know whether a response has been sent when the handler has finished executing.</p> + +<p>The Req object allows accessing both immutable and mutable state. This means that calling some of the functions twice will not produce the same result. For example, when streaming the request body, the function will return the body by chunks, one at a time, until there is none left.</p> + +<p>It also caches the result of operations performed on the immutable state. That means that some calls will give a result much faster when called many times.</p> + +<h2 id="overview_of_the_cowboy_req_interface">Overview of the cowboy_req interface</h2> + +<p>The <code>cowboy_req</code> interface is divided in four groups of functions, each having a well defined return type signature common to the entire group.</p> + +<p>The first group, access functions, will always return <code>{Value, Req}</code>. The group includes all the following functions: <code>binding/{2,3}</code>, <code>bindings/1</code>, <code>body_length/1</code>, <code>cookie/{2,3}</code>, <code>cookies/1</code>, <code>header/{2,3}</code>, <code>headers/1</code>, <code>host/1</code>, <code>host_info/1</code>, <code>host_url/1</code>, <code>meta/{2,3}</code>, <code>method/1</code>, <code>path/1</code>, <code>path_info/1</code>, <code>peer/1</code>, <code>port/1</code>, <code>qs/1</code>, <code>qs_val/{2,3}</code>, <code>qs_vals/1</code>, <code>url/1</code>, <code>version/1</code>.</p> + +<p>The second group, question functions, will always return a <code>boolean()</code>. The group includes the following three functions: <code>has_body/1</code>, <code>has_resp_body/1</code>, <code>has_resp_header/2</code>.</p> + +<p>The third group contains the functions that manipulate the socket or perform operations that may legitimately fail. They may return <code>{Result, Req}</code>, <code>{Result, Value, Req}</code> or <code>{error, atom()}</code>. This includes the following functions: <code>body/{1,2}</code>, <code>body_qs/{1,2}</code>, <code>chunked_reply/{2,3}</code>, <code>parse_header/{2,3}</code>, <code>part/{1,2}</code>, <code>part_body/{1,2}</code> and <code>reply/{2,3,4}</code>. Finally, the group also includes the <code>chunk/2</code> and <code>continue/1</code> functions which always return <code>ok</code>.</p> + +<p>The final group modifies the Req object state without performing any immediate operations. As these functions can't fail, they always return a new <code>Req</code> directly. This includes the following functions: <code>compact/1</code>, <code>delete_resp_header/2</code>, <code>set_meta/3</code>, <code>set_resp_body/2</code>, <code>set_resp_body_fun/{2,3}</code>, <code>set_resp_cookie/4</code>, <code>set_resp_header/3</code>.</p> + +<p>This chapter covers most of the first group, plus a few other functions. The next few chapters cover cookies handling, reading the request body and sending a response.</p> + +<h2 id="request">Request</h2> + +<p>When a client performs a request, it first sends a few required values. They are sent differently depending on the protocol being used, but the intent is the same. They indicate to the server the type of action it wants to do and how to locate the resource to perform it on.</p> + +<p>The method identifies the action. Standard methods include GET, HEAD, OPTIONS, PATCH, POST, PUT, DELETE. Method names are case sensitive.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Method, Req2} = cowboy_req:method(Req). +]]></script> + +<p>The host, port and path parts of the URL identify the resource being accessed. The host and port information may not be available if the client uses HTTP/1.0.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Host, Req2} = cowboy_req:host(Req), +{Port, Req3} = cowboy_req:port(Req2), +{Path, Req4} = cowboy_req:path(Req3). +]]></script> + +<p>The version used by the client can of course also be obtained.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Version, Req2} = cowboy_req:version(Req). +]]></script> + +<p>Do note however that clients claiming to implement one version of the protocol does not mean they implement it fully, or even properly.</p> + +<h2 id="bindings">Bindings</h2> + +<p>After routing the request, bindings are available. Bindings are these parts of the host or path that you chose to extract when defining the routes of your application.</p> + +<p>You can fetch a single binding. The value will be <code>undefined</code> if the binding doesn't exist.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Binding, Req2} = cowboy_req:binding(my_binding, Req). +]]></script> + +<p>If you need a different value when the binding doesn't exist, you can change the default.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Binding, Req2} = cowboy_req:binding(my_binding, Req, 42). +]]></script> + +<p>You can also obtain all bindings in one call. They will be returned as a list of key/value tuples.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{AllBindings, Req2} = cowboy_req:bindings(Req). +]]></script> + +<p>If you used <code>...</code> at the beginning of the route's pattern for the host, you can retrieve the matched part of the host. The value will be <code>undefined</code> otherwise.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{HostInfo, Req2} = cowboy_req:host_info(Req). +]]></script> + +<p>Similarly, if you used <code>...</code> at the end of the route's pattern for the path, you can retrieve the matched part, or get <code>undefined</code> otherwise.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{PathInfo, Req2} = cowboy_req:path_info(Req). +]]></script> + +<h2 id="query_string">Query string</h2> + +<p>The query string can be obtained directly.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Qs, Req2} = cowboy_req:qs(Req). +]]></script> + +<p>You can also requests only one value.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{QsVal, Req2} = cowboy_req:qs_val(<<"lang">>, Req). +]]></script> + +<p>If that value is optional, you can define a default to simplify your task.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{QsVal, Req2} = cowboy_req:qs_val(<<"lang">>, Req, <<"en">>). +]]></script> + +<p>Finally, you can obtain all query string values.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{AllValues, Req2} = cowboy_req:qs_vals(Req). +]]></script> + +<h2 id="request_url">Request URL</h2> + +<p>You can reconstruct the full URL of the resource.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{URL, Req2} = cowboy_req:url(Req). +]]></script> + +<p>You can also obtain only the base of the URL, excluding the path and query string.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{BaseURL, Req2} = cowboy_req:host_url(Req). +]]></script> + +<h2 id="headers">Headers</h2> + +<p>Cowboy allows you to obtain the header values as string, or parsed into a more meaningful representation.</p> + +<p>This will get the string value of a header.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{HeaderVal, Req2} = cowboy_req:header(<<"content-type">>, Req). +]]></script> + +<p>You can of course set a default in case the header is missing.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{HeaderVal, Req2} + = cowboy_req:header(<<"content-type">>, Req, <<"text/plain">>). +]]></script> + +<p>And also obtain all headers.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{AllHeaders, Req2} = cowboy_req:headers(Req). +]]></script> + +<p>To parse the previous header, simply call <code>parse_header/{2,3}</code> where you would call <code>header/{2,3}</code> otherwise. Note that the return value changes and includes the result of the operation as the first element of the returned tuple. A successful parse returns <code>ok</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, ParsedVal, Req2} = cowboy_req:parse_header(<<"content-type">>, Req). +]]></script> + +<p>When Cowboy doesn't know how to parse the given header, the result of the operation will be <code>undefined</code> and the string value will be returned instead.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{undefined, HeaderVal, Req2} + = cowboy_req:parse_header(<<"unicorn-header">>, Req). +]]></script> + +<p>When parsing fails, <code>{error, Reason}</code> is returned instead.</p> + +<p>You can of course define a default value. Note that the default value you specify here is the parsed value you'd like to get by default.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, ParsedVal, Req2} + = cowboy_req:parse_header(<<"content-type">>, Req, + {<<"text">>, <<"plain">>, []}). +]]></script> + +<p>The list of known headers and default values is defined in the manual. Also note that the result of parsing is cached, so calling this function multiple times for the same values will not have a significant performance impact.</p> + +<h2 id="meta">Meta</h2> + +<p>Cowboy will sometimes associate some meta information with the request. Built-in meta values are listed in the manual for their respective modules.</p> + +<p>This will get a meta value. The returned value will be <code>undefined</code> if it isn't defined.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{MetaVal, Req2} = cowboy_req:meta(websocket_version, Req). +]]></script> + +<p>You can change the default value if needed.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{MetaVal, Req2} = cowboy_req:meta(websocket_version, Req, 13). +]]></script> + +<p>You can also define your own meta values. The name must be an <code>atom()</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set_meta(the_answer, 42, Req). +]]></script> + +<h2 id="peer">Peer</h2> + +<p>You can obtain the peer address and port number. This is not necessarily the actual IP and port of the client, but rather the one of the machine that connected to the server.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{{IP, Port}, Req2} = cowboy_req:peer(Req). +]]></script> + +<h2 id="reducing_the_memory_footprint">Reducing the memory footprint</h2> + +<p>When you are done reading information from the request object and know you are not going to access it anymore, for example when using long-polling or Websocket, you can use the <code>compact/1</code> function to remove most of the data from the request object and free memory.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:compact(Req). +]]></script> + +<p>You will still be able to send a reply if needed.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/req_body/index.html b/_build/static/docs/en/cowboy/1.0/guide/req_body/index.html new file mode 100644 index 00000000..b6365a8f --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/req_body/index.html @@ -0,0 +1,296 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Reading the request body</span></h1> + +<p>The Req object also allows you to read the request body.</p> + +<p>Because the request body can be of any size, all body reading operations will only work once, as Cowboy will not cache the result of these operations.</p> + +<p>Cowboy will not attempt to read the body until you do. If handler execution ends without reading it, Cowboy will simply skip it.</p> + +<p>Cowboy provides different ways to read the request body. You can read it directly, stream it, but also read and parse in a single call for form urlencoded formats or multipart. All of these except multipart are covered in this chapter. Multipart is covered later on in the guide.</p> + +<h2 id="check_for_request_body">Check for request body</h2> + +<p>You can check whether a body was sent with the request.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy_req:has_body(Req). +]]></script> + +<p>It will return <code>true</code> if there is a request body, and <code>false</code> otherwise.</p> + +<p>Note that it is generally safe to assume that a body is sent for <code>POST</code>, <code>PUT</code> and <code>PATCH</code> requests, without having to explicitly check for it.</p> + +<h2 id="request_body_length">Request body length</h2> + +<p>You can obtain the body length if it was sent with the request.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{Length, Req2} = cowboy_req:body_length(Req). +]]></script> + +<p>The value returned will be <code>undefined</code> if the length couldn't be figured out from the request headers. If there's a body but no length is given, this means that the chunked transfer-encoding was used. You can read chunked bodies by using the stream functions.</p> + +<h2 id="reading_the_body">Reading the body</h2> + +<p>You can read the whole body directly in one call.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Body, Req2} = cowboy_req:body(Req). +]]></script> + +<p>By default, Cowboy will attempt to read up to a size of 8MB. You can override this limit as needed.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Body, Req2} = cowboy_req:body(Req, [{length, 100000000}]). +]]></script> + +<p>You can also disable it.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Body, Req2} = cowboy_req:body(Req, [{length, infinity}]). +]]></script> + +<p>It is recommended that you do not disable it for public facing websites.</p> + +<p>If the body is larger than the limit, then Cowboy will return a <code>more</code> tuple instead, allowing you to stream it if you would like to.</p> + +<h2 id="streaming_the_body">Streaming the body</h2> + +<p>You can stream the request body by chunks.</p> + +<p>Cowboy returns a <code>more</code> tuple when there is more body to be read, and an <code>ok</code> tuple for the last chunk. This allows you to loop over all chunks.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +body_to_console(Req) -> + case cowboy_req:body(Req) of + {ok, Data, Req2} -> + io:format("~s", [Data]), + Req2; + {more, Data, Req2} -> + io:format("~s", [Data]), + body_to_console(Req2) + end. +]]></script> + +<p>You can of course set the <code>length</code> option to configure the size of chunks.</p> + +<h2 id="rate_of_data_transmission">Rate of data transmission</h2> + +<p>You can control the rate of data transmission by setting options when calling body functions. This applies not only to the functions described in this chapter, but also to the multipart functions.</p> + +<p>The <code>read_length</code> option defines the maximum amount of data to be received from the socket at once, in bytes.</p> + +<p>The <code>read_timeout</code> option defines the time Cowboy waits before that amount is received, in milliseconds.</p> + +<h2 id="transfer_and_content_decoding">Transfer and content decoding</h2> + +<p>Cowboy will by default decode the chunked transfer-encoding if any. It will not decode any content-encoding by default.</p> + +<p>The first time you call a body function you can set the <code>transfer_decode</code> and <code>content_decode</code> options. If the body was already started being read these options are simply ignored.</p> + +<p>The following example shows how to set both options.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:body(Req, [ + {transfer_decode, fun transfer_decode/2, TransferState}, + {content_decode, fun content_decode/1} +]). +]]></script> + +<h2 id="reading_a_form_urlencoded_body">Reading a form urlencoded body</h2> + +<p>You can directly obtain a list of key/value pairs if the body was sent using the application/x-www-form-urlencoded content-type.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, KeyValues, Req2} = cowboy_req:body_qs(Req). +]]></script> + +<p>You can then retrieve an individual value from that list.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{_, Lang} = lists:keyfind(lang, 1, KeyValues). +]]></script> + +<p>You should not attempt to match on the list as the order of the values is undefined.</p> + +<p>By default Cowboy will reject bodies with a size above 64KB when using this function. You can override this limit by setting the <code>length</code> option.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, KeyValues, Req2} = cowboy_req:body_qs(Req, + [{length, 2000000}]). +]]></script> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/resource_design/index.html b/_build/static/docs/en/cowboy/1.0/guide/resource_design/index.html new file mode 100644 index 00000000..24977abb --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/resource_design/index.html @@ -0,0 +1,294 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Designing a resource handler</span></h1> + +<p>This chapter aims to provide you with a list of questions you must answer in order to write a good resource handler. It is meant to be usable as a step by step guide.</p> + +<h2 id="the_service">The service</h2> + +<p>Can the service become unavailable, and when it does, can we detect it? For example database connectivity problems may be detected early. We may also have planned outages of all or parts of the system. Implement the <code>service_available</code> callback.</p> + +<p>What HTTP methods does the service implement? Do we need more than the standard OPTIONS, HEAD, GET, PUT, POST, PATCH and DELETE? Are we not using one of those at all? Implement the <code>known_methods</code> callback.</p> + +<h2 id="type_of_resource_handler">Type of resource handler</h2> + +<p>Am I writing a handler for a collection of resources, or for a single resource?</p> + +<p>The semantics for each of these are quite different. You should not mix collection and single resource in the same handler.</p> + +<h2 id="collection_handler">Collection handler</h2> + +<p>Skip this section if you are not doing a collection.</p> + +<p>Is the collection hardcoded or dynamic? For example if you use the route <code>/users</code> for the collection of users then the collection is hardcoded; if you use <code>/forums/:category</code> for the collection of threads then it isn't. When the collection is hardcoded you can safely assume the resource always exists.</p> + +<p>What methods should I implement?</p> + +<p>OPTIONS is used to get some information about the collection. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p> + +<p>HEAD and GET are used to retrieve the collection. If you allow GET, also allow HEAD as there's no extra work required to make it work.</p> + +<p>POST is used to create a new resource inside the collection. Creating a resource by using POST on the collection is useful when resources may be created before knowing their URI, usually because parts of it are generated dynamically. A common case is some kind of auto incremented integer identifier.</p> + +<p>The next methods are more rarely allowed.</p> + +<p>PUT is used to create a new collection (when the collection isn't hardcoded), or replace the entire collection.</p> + +<p>DELETE is used to delete the entire collection.</p> + +<p>PATCH is used to modify the collection using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for such things as reordering; adding, modifying or deleting parts of the collection.</p> + +<h2 id="single_resource_handler">Single resource handler</h2> + +<p>Skip this section if you are doing a collection.</p> + +<p>What methods should I implement?</p> + +<p>OPTIONS is used to get some information about the resource. It is recommended to allow it even if you do not implement it, as Cowboy has a default implementation built-in.</p> + +<p>HEAD and GET are used to retrieve the resource. If you allow GET, also allow HEAD as there's no extra work required to make it work.</p> + +<p>POST is used to update the resource.</p> + +<p>PUT is used to create a new resource (when it doesn't already exist) or replace the resource.</p> + +<p>DELETE is used to delete the resource.</p> + +<p>PATCH is used to modify the resource using instructions given in the request body. A PATCH operation is atomic. The PATCH operation may be used for adding, removing or modifying specific values in the resource.</p> + +<h2 id="the_resource">The resource</h2> + +<p>Following the above discussion, implement the <code>allowed_methods</code> callback.</p> + +<p>Does the resource always exist? If it may not, implement the <code>resource_exists</code> callback.</p> + +<p>Do I need to authenticate the client before they can access the resource? What authentication mechanisms should I provide? This may include form-based, token-based (in the URL or a cookie), HTTP basic, HTTP digest, SSL certificate or any other form of authentication. Implement the <code>is_authorized</code> callback.</p> + +<p>Do I need fine-grained access control? How do I determine that they are authorized access? Handle that in your <code>is_authorized</code> callback.</p> + +<p>Can access to a resource be forbidden regardless of access being authorized? A simple example of that is censorship of a resource. Implement the <code>forbidden</code> callback.</p> + +<p>Is there any constraints on the length of the resource URI? For example the URI may be used as a key in storage and may have a limit in length. Implement <code>uri_too_long</code>.</p> + +<h2 id="representations">Representations</h2> + +<p>What media types do I provide? If text based, what charsets are provided? What languages do I provide?</p> + +<p>Implement the mandatory <code>content_types_provided</code>. Prefix the callbacks with <code>to_</code> for clarity. For example <code>to_html</code> or <code>to_text</code>.</p> + +<p>Implement the <code>languages_provided</code> or <code>charsets_provided</code> callbacks if applicable.</p> + +<p>Is there any other header that may make the representation of the resource vary? Implement the <code>variances</code> callback.</p> + +<p>Depending on your choices for caching content, you may want to implement one or more of the <code>generate_etag</code>, <code>last_modified</code> and <code>expires</code> callbacks.</p> + +<p>Do I want the user or user agent to actively choose a representation available? Send a list of available representations in the response body and implement the <code>multiple_choices</code> callback.</p> + +<h2 id="redirections">Redirections</h2> + +<p>Do I need to keep track of what resources were deleted? For example you may have a mechanism where moving a resource leaves a redirect link to its new location. Implement the <code>previously_existed</code> callback.</p> + +<p>Was the resource moved, and is the move temporary? If it is explicitly temporary, for example due to maintenance, implement the <code>moved_temporarily</code> callback. Otherwise, implement the <code>moved_permanently</code> callback.</p> + +<h2 id="the_request">The request</h2> + +<p>Do we need to perform extra checks to make sure the request is valid? Cowboy will do many checks when receiving the request already, do we need more? Note that this only applies to the request-line and headers of the request, and not the body. Implement <code>malformed_request</code>.</p> + +<p>May there be a request body? Will I know its size? What's the maximum size of the request body I'm willing to accept? Implement <code>valid_entity_length</code>.</p> + +<p>Finally, take a look at the sections corresponding to the methods you are implementing.</p> + +<h2 id="options_method">OPTIONS method</h2> + +<p>Cowboy by default will send back a list of allowed methods. Do I need to add more information to the response? Implement the <code>options</code> method.</p> + +<h2 id="get_and_head_methods">GET and HEAD methods</h2> + +<p>If you implement the methods GET and/or HEAD, you must implement one <code>ProvideResource</code> callback for each content-type returned by the <code>content_types_provided</code> callback.</p> + +<h2 id="put,_post_and_patch_methods">PUT, POST and PATCH methods</h2> + +<p>If you implement the methods PUT, POST and/or PATCH, you must implement the <code>content_types_accepted</code> callback, and one <code>AcceptResource</code> callback for each content-type it returns. Prefix the <code>AcceptResource</code> callback names with <code>from_</code> for clarity. For example <code>from_html</code> or <code>from_json</code>.</p> + +<p>Do we want to allow the POST method to create individual resources directly through their URI (like PUT)? Implement the <code>allow_missing_post</code> callback. It is recommended to explicitly use PUT in these cases instead.</p> + +<p>May there be conflicts when using PUT to create or replace a resource? Do we want to make sure that two updates around the same time are not cancelling one another? Implement the <code>is_conflict</code> callback.</p> + +<h2 id="delete_methods">DELETE methods</h2> + +<p>If you implement the method DELETE, you must implement the <code>delete_resource</code> callback.</p> + +<p>When <code>delete_resource</code> returns, is the resource completely removed from the server, including from any caching service? If not, and/or if the deletion is asynchronous and we have no way of knowing it has been completed yet, implement the <code>delete_completed</code> callback.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/resp/index.html b/_build/static/docs/en/cowboy/1.0/guide/resp/index.html new file mode 100644 index 00000000..d61be41b --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/resp/index.html @@ -0,0 +1,327 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Sending a response</span></h1> + +<p>The Req object also allows you to send a response.</p> + +<p>You can only send one response. Any other attempt will trigger a crash. The response may be sent in one go or with its body streamed by chunks of arbitrary size.</p> + +<p>You can also set headers or the response body in advance and Cowboy will use them when you finally do reply.</p> + +<h2 id="reply">Reply</h2> + +<p>You can send a reply with no particular headers or body. Cowboy will make sure to send the mandatory headers with the response.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(200, Req). +]]></script> + +<p>You can define headers to be sent with the response. Note that header names must be lowercase. Again, Cowboy will make sure to send the mandatory headers with the response.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(303, [ + {<<"location">>, <<"http://ninenines.eu">>} +], Req). +]]></script> + +<p>You can override headers that Cowboy would send otherwise. Any header set by the user will be used over the ones set by Cowboy. For example, you can advertise yourself as a different server.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(200, [ + {<<"server">>, <<"yaws">>} +], Req). +]]></script> + +<p>We also saw earlier how to force close the connection by overriding the connection header.</p> + +<p>Finally, you can also send a body with the response. Cowboy will automatically set the content-length header if you do. We recommend that you set the content-type header so the client may know how to read the body.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(200, [ + {<<"content-type">>, <<"text/plain">>} +], "Hello world!", Req). +]]></script> + +<p>Here is the same example but sending HTML this time.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:reply(200, [ + {<<"content-type">>, <<"text/html">>} +], "<html><head>Hello world!</head><body><p>Hats off!</p></body></html>", Req). +]]></script> + +<p>Note that the reply is sent immediately.</p> + +<h2 id="chunked_reply">Chunked reply</h2> + +<p>You can also stream the response body. First, you need to initiate the reply by sending the response status code. Then you can send the body in chunks of arbitrary size.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:chunked_reply(200, Req), +ok = cowboy_req:chunk("Hello...", Req2), +ok = cowboy_req:chunk("chunked...", Req2), +ok = cowboy_req:chunk("world!!", Req2). +]]></script> + +<p>You should make sure to match on <code>ok</code> as an error may be returned.</p> + +<p>While it is possible to send a chunked response without a content-type header, it is still recommended. You can set this header or any other just like for normal replies.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{ok, Req2} = cowboy_req:chunked_reply(200, [ + {<<"content-type">>, <<"text/html">>} +], Req), +ok = cowboy_req:chunk("<html><head>Hello world!</head>", Req2), +ok = cowboy_req:chunk("<body><p>Hats off!</p></body></html>", Req2). +]]></script> + +<p>Note that the reply and each chunk following it are sent immediately.</p> + +<h2 id="preset_response_headers">Preset response headers</h2> + +<p>You can define response headers in advance. They will be merged into the headers given in the reply call. Headers in the reply call override preset response headers which override the default Cowboy headers.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set_resp_header(<<"allow">>, "GET", Req). +]]></script> + +<p>You can check if a response header has already been set. This will only check the response headers that you set, and not the ones Cowboy will add when actually sending the reply.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy_req:has_resp_header(<<"allow">>, Req). +]]></script> + +<p>It will return <code>true</code> if the header is defined, and <code>false</code> otherwise.</p> + +<p>Finally, you can also delete a preset response header if needed. If you do, it will not be sent.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:delete_resp_header(<<"allow">>, Req). +]]></script> + +<h2 id="preset_response_body">Preset response body</h2> + +<p>You can set the response body in advance. Note that this body will be ignored if you then choose to send a chunked reply, or if you send a reply with an explicit body.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Req2 = cowboy_req:set_resp_body("Hello world!", Req). +]]></script> + +<p>You can also set a fun that will be called when it is time to send the body. There are three different ways of doing that.</p> + +<p>If you know the length of the body that needs to be sent, you should specify it, as it will help clients determine the remaining download time and allow them to inform the user.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +F = fun (Socket, Transport) -> + Transport:send(Socket, "Hello world!") +end, +Req2 = cowboy_req:set_resp_body_fun(12, F, Req). +]]></script> + +<p>If you do not know the length of the body, you should use a chunked response body fun instead.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +F = fun (SendChunk) -> + Body = lists:duplicate(random:uniform(1024, $a)), + SendChunk(Body) +end, +Req2 = cowboy_req:set_resp_body_fun(chunked, F, Req). +]]></script> + +<p>Finally, you can also send data on the socket directly, without knowing the length in advance. Cowboy may be forced to close the connection at the end of the response though depending on the protocol capabilities.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +F = fun (Socket, Transport) -> + Body = lists:duplicate(random:uniform(1024, $a)), + Transport:send(Socket, Body) +end, +Req2 = cowboy_req:set_resp_body_fun(F, Req). +]]></script> + +<h2 id="sending_files">Sending files</h2> + +<p>You can send files directly from disk without having to read them. Cowboy will use the <code>sendfile</code> syscall when possible, which means that the file is sent to the socket directly from the kernel, which is a lot more performant than doing it from userland.</p> + +<p>Again, it is recommended to set the size of the file if it can be known in advance.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +F = fun (Socket, Transport) -> + Transport:sendfile(Socket, "priv/styles.css") +end, +Req2 = cowboy_req:set_resp_body_fun(FileSize, F, Req). +]]></script> + +<p>Please see the Ranch guide for more information about sending files.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_cond.png b/_build/static/docs/en/cowboy/1.0/guide/rest_cond.png Binary files differnew file mode 100644 index 00000000..64cda347 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_cond.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_cond.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_cond.svg new file mode 100644 index 00000000..542ae17d --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_cond.svg @@ -0,0 +1,1656 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_cond.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="2.0000001" + inkscape:cx="351.17815" + inkscape:cy="292.20555" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(303.92143,-296.03137)" + id="g5650-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-212.00698)" + id="g5650-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-129.04326)" + id="g5650-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-44.866334)" + id="g5650-94" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-71" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,38.329623)" + id="g5650-93" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,122.59665)" + id="g5650-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-93" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-04" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,206.62103)" + id="g5650-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,248.85545)" + id="g5650-2-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,72.326854,331.8341)" + id="g5650-2-04" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-9" + d="m -57.78256,274.83062 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-0" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="141.04909" + y="204.49196" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-5" + width="210.17955" + height="35.209244" + x="141.04909" + y="288.06644" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8" + width="210.17955" + height="35.209244" + x="141.04909" + y="371.6409" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4" + width="210.17955" + height="35.209244" + x="141.04909" + y="455.21542" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0,-1,1,0,72.019862,498.61197)" + id="g5650-2-04-1" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-9-6" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-0-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87" + width="210.17955" + height="35.209244" + x="141.04909" + y="538.78992" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="translate(303.92156,289.38374)" + id="g5650-6-2" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-273.77202,830.73267)" + id="g5650-2-0-4-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.00956,743.77999)" + id="g5650-2-0-4-9-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 100.30195,432.97597 c 0,0 -104.1879007,-96.82159 -227.75958,-12.49311" + id="path20172-9-6-0" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,146.48523,357.79168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-5-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41" + width="210.17955" + height="35.209244" + x="140.98338" + y="622.36444" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="141.04909" + y="120.91741" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(417.86479,-176.50006)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.18575" + y="311.63589" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="246.18575" + y="311.63589">has if-unmodified-since?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="245.60762" + y="478.78488" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="245.60762" + y="478.78488">has if-none-match?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.15059" + y="55.939754" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="246.15059" + y="55.939754" + id="tspan17171">...</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.11153" + y="560.125" + id="text5371-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="246.11153" + y="560.125">generate_etag</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.64278" + y="645.9339" + id="text5371-2-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2" + x="246.64278" + y="645.9339">has if-modified-since?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.13106" + y="144.48688" + id="text5371-2-95" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="246.13106" + y="144.48688">has if-match?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="245.80684" + y="225.82706" + id="text5371-2-32" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="245.80684" + y="225.82706">generate_etag</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.05293" + y="393.43692" + id="text5371-2-74" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18" + x="246.05293" + y="393.43692">last_modified</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="185.95248" + id="text5371-2-391" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="262.26562" + y="185.95248">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="269.61978" + id="text5371-2-954" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-808" + x="262.26562" + y="269.61978">match*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="353.28702" + id="text5371-2-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-11" + x="262.26562" + y="353.28702">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="436.95425" + id="text5371-2-92" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-4" + x="262.26562" + y="436.95425">not modified*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="520.62152" + id="text5371-2-739" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0" + x="262.26562" + y="520.62152">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="261.24219" + y="604.14661" + id="text5371-2-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3" + x="261.24219" + y="604.14661">no match*</tspan></text> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="66.515488" + y="227.88033" + id="text5371-4-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="66.515488" + y="227.88033">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="66.097519" + y="385.50708" + id="text5371-4-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-01" + x="66.097519" + y="385.50708">false, or</tspan><tspan + sodipodi:role="line" + x="66.097519" + y="405.50708" + id="tspan21678">invalid</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="413.26172" + y="414.19577" + id="text5371-4-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62" + x="413.26172" + y="414.19577">modified*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="66.515488" + y="563.13391" + id="text5371-4-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2" + x="66.515488" + y="563.13391">false</tspan></text> + <g + transform="matrix(-1,0,0,-1,541.38289,824.55574)" + id="g5650-2-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="218.52127" + height="34.993004" + x="489.90482" + y="372.18814" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="599.20062" + y="394.09869" + id="text5371-43" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="599.20062" + y="394.09869">412 precondition failed</tspan></text> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + <g + transform="matrix(0,-1,1,0,-508.93096,565.23553)" + id="g5650-2-0-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,416.17722)" + id="g5650-2-0-4-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-6" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,583.49898)" + id="g5650-2-0-4-5" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-0" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-6" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0.70472302,-0.70948254,0.70948254,0.70472302,241.97558,40.02582)" + id="g5650-2-1-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-2-8" + d="m -64.113139,212.68162 6.332851,190.92097" + style="opacity:0.80000000000000004;fill:none;stroke:#9b3b1c;stroke-width:1.99999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-9-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="511.01306" + y="-49.514503" + id="text5371-4-5-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" + transform="matrix(0.72036037,0.69359998,-0.69359998,0.72036037,0,0)"><tspan + sodipodi:role="line" + id="tspan5373-9-09-1" + x="511.01306" + y="-49.514503">no match*</tspan></text> + <g + transform="translate(303.92156,371.88426)" + id="g5650-6-2-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4-2" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41-0" + width="210.17955" + height="35.209244" + x="140.98338" + y="705.93896" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.11142" + y="729.50842" + id="text5371-2-7-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2-1" + x="246.11142" + y="729.50842">date is in the future?</tspan></text> + <g + transform="translate(303.92156,455.39272)" + id="g5650-6-2-1" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4-6" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2-2" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,72.385532,749.33549)" + id="g5650-2-04-1-2" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-9-6-9" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-0-7-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2-6" + width="210.17955" + height="35.209244" + x="140.98338" + y="789.51343" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.04581" + y="811.30945" + id="text5371-2-7-9-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2-1-1" + x="246.04581" + y="811.30945">last_modified</tspan></text> + <g + id="g5650-39" + transform="translate(656.94774,376.09516)"> + <path + inkscape:connector-curvature="0" + id="path5570-0" + d="m -57.78256,195.3221 0,204.64594" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,159.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-124" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-7" + width="218.52127" + height="34.993004" + x="489.90482" + y="957.01166" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="599.28265" + y="980.47302" + id="text5371-43-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-6" + x="599.28265" + y="980.47302">304 not modified</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2-6-4" + width="210.17955" + height="35.209244" + x="140.98338" + y="873.08795" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.08487" + y="891.68475" + id="text5371-2-7-9-0-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2-1-1-0" + x="246.08487" + y="891.68475">...</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="66.097519" + y="720.76068" + id="text5371-4-2-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-01-9" + x="66.097519" + y="720.76068">false, or</tspan><tspan + sodipodi:role="line" + x="66.097519" + y="740.76068" + id="tspan21678-9">invalid</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="412.95471" + y="580.78271" + id="text5371-4-3-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9" + x="412.95471" + y="580.78271">match*</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3.05435514;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41-0-7" + width="218.20164" + height="35.154888" + x="490.06448" + y="538.81708" + rx="15.572517" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="599.00122" + y="562.35938" + id="text5371-2-7-9-04" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2-1-6" + x="599.00122" + y="562.35938">method is GET/HEAD?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="621.08008" + y="607.0827" + id="text5371-2-739-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0-0" + x="621.08008" + y="607.0827">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="640.17383" + y="518.34009" + id="text5371-4-4-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6" + x="640.17383" + y="518.34009">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="157.927" + y="770.83472" + id="text5371-4-4-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-4" + x="157.927" + y="770.83472">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.32812" + y="771.29565" + id="text5371-2-739-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0-1" + x="262.32812" + y="771.29565">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="687.26025" + id="text5371-2-739-56" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0-8" + x="262.26562" + y="687.26025">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="261.24219" + y="854.87012" + id="text5371-2-739-5-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0-1-3" + x="261.24219" + y="854.87012">modified*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="417.07037" + y="834.64905" + id="text5371-4-3-9-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9-4" + x="417.07037" + y="834.64905">not modified*</tspan></text> + <g + transform="translate(656.94774,455.40497)" + id="g5650-6-2-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4-1" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2-09" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-5" + width="210.17955" + height="35.209244" + x="490.03729" + y="789.51343" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="595.41223" + y="810.84851" + id="text5371-2-32-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-8" + x="595.41223" + y="810.84851">generate_etag</tspan></text> + <g + transform="translate(656.94774,539.41312)" + id="g5650-6-2-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-5-0" + width="210.17955" + height="35.209244" + x="490.03729" + y="873.08795" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="595.41223" + y="894.42303" + id="text5371-2-32-1-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-8-6" + x="595.41223" + y="894.42303">expires</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.png b/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.png Binary files differnew file mode 100644 index 00000000..65ecdcf3 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.svg new file mode 100644 index 00000000..247567a0 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_conneg.svg @@ -0,0 +1,1135 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_conneg.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="222.80947" + inkscape:cy="634.56615" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(303.92143,-296.03137)" + id="g5650-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-212.00698)" + id="g5650-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-129.04326)" + id="g5650-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,-44.866334)" + id="g5650-94" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-71" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,38.329623)" + id="g5650-93" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,122.59665)" + id="g5650-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-93" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-04" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(303.92143,206.62103)" + id="g5650-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,248.85545)" + id="g5650-2-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,72.326854,331.8341)" + id="g5650-2-04" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-9" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-0" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="141.04909" + y="204.67757" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-5" + width="210.17955" + height="35.209244" + x="141.04909" + y="288.40311" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8" + width="210.17955" + height="35.209244" + x="141.04909" + y="372.01199" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4" + width="210.17955" + height="35.209244" + x="141.04909" + y="455.67929" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87" + width="210.17955" + height="35.209244" + x="141.04909" + y="539.34656" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="translate(303.92156,289.38374)" + id="g5650-6-2" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-4" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-2" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41" + width="210.17955" + height="35.209244" + x="141.04909" + y="623.01385" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="141.04909" + y="121.0042" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(417.86479,-176.50006)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.18575" + y="310.19913" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="246.18575" + y="310.19913">has accept-language?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="245.60762" + y="477.47531" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="245.60762" + y="477.47531">has accept-charset?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="245.00391" + y="60.912468" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="245.00391" + y="60.912468" + id="tspan17171">start</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.11153" + y="561.14258" + id="text5371-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="246.11153" + y="561.14258">charsets_provided</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.64278" + y="646.58331" + id="text5371-2-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2" + x="246.64278" + y="646.58331">variances</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.13106" + y="142.80627" + id="text5371-2-95" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="246.13106" + y="142.80627">has accept?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="245.80684" + y="226.4736" + id="text5371-2-32" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="245.80684" + y="226.4736">content_types_provided</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.05293" + y="393.80801" + id="text5371-2-74" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18" + x="246.05293" + y="393.80801">languages_provided</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="185.95248" + id="text5371-2-391" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="262.26562" + y="185.95248">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="269.61978" + id="text5371-2-954" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-808" + x="262.26562" + y="269.61978">provided*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="353.28702" + id="text5371-2-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-11" + x="262.26562" + y="353.28702">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="436.95425" + id="text5371-2-92" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-4" + x="262.26562" + y="436.95425">provided*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="520.62152" + id="text5371-2-739" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-0" + x="262.26562" + y="520.62152">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="262.26562" + y="604.28876" + id="text5371-2-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3" + x="262.26562" + y="604.28876">provided*</tspan></text> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="76.761719" + y="227.88033" + id="text5371-4-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="76.761719" + y="227.88033">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="76.761719" + y="395.20209" + id="text5371-4-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-01" + x="76.761719" + y="395.20209">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="413.26172" + y="374.19577" + id="text5371-4-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62" + x="413.26172" + y="374.19577">not provided*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="76.761719" + y="562.52386" + id="text5371-4-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2" + x="76.761719" + y="562.52386">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-8.8034744" + y="663.24762" + id="text5371-4-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" + transform="matrix(0.7410941,-0.67140117,0.67140117,0.7410941,0,0)"><tspan + sodipodi:role="line" + id="tspan5373-9-09" + x="-8.8034744" + y="663.24762">not provided*</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="218.52127" + height="34.993004" + x="489.90482" + y="372.18814" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(-0.65781496,-0.75317958,0.75317958,-0.65781496,150.24236,637.46542)" + id="g5650-2-1" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-2" + d="m -59.488319,210.57681 1.65844,193.00059" + style="opacity:0.80000000000000004;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-9" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="599.20062" + y="394.09869" + id="text5371-43" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="599.20062" + y="394.09869">406 not acceptable</tspan></text> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + <g + transform="matrix(0,-1,1,0,-508.93096,565.23553)" + id="g5650-2-0-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,416.17722)" + id="g5650-2-0-4-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-6" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-276.88574,583.49898)" + id="g5650-2-0-4-5" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-0" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-6" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0.70472302,-0.70948254,0.70948254,0.70472302,241.97558,40.02582)" + id="g5650-2-1-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-2-2-8" + d="m -64.113139,212.68162 6.332851,190.92097" + style="opacity:0.80000000000000004;fill:none;stroke:#9b3b1c;stroke-width:1.99999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-9-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="509.41452" + y="-106.16136" + id="text5371-4-5-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" + transform="matrix(0.69480867,0.71919462,-0.71919462,0.69480867,0,0)"><tspan + sodipodi:role="line" + id="tspan5373-9-09-1" + x="509.41452" + y="-106.16136">not provided*</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41-0" + width="210.17955" + height="35.209244" + x="141.049" + y="706.68097" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="246.15048" + y="725.27777" + id="text5371-2-7-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-2-1" + x="246.15048" + y="725.27777">...</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_delete.png b/_build/static/docs/en/cowboy/1.0/guide/rest_delete.png Binary files differnew file mode 100644 index 00000000..56a861c0 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_delete.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_delete.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_delete.svg new file mode 100644 index 00000000..2f5513cd --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_delete.svg @@ -0,0 +1,1718 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_delete.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="187.51922" + inkscape:cy="446.38557" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(416.63925,-305.0045)" + id="g5650-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,270.15614)" + id="g5650-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-93" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-04" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,435.68973)" + id="g5650-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,-141.93971)" + id="g5650-0-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,-59.713866)" + id="g5650-0-6-5" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3-8" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-307.35528,398.54403)" + id="g5650-2-0-4-8-8-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5-6-2" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2-8-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="108.01281" + y="275.4668" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="translate(270.88515,105.33602)" + id="g5650-2-2-7"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-3" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-9" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-310.05718,566.15049)" + id="g5650-2-0-4-3-8-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-8" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-7" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-5" + width="210.17955" + height="35.209244" + x="108.01281" + y="440.50873" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0,-1,1,0,-308.28941,729.66893)" + id="g5650-2-0-4-8-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5-6" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2-8" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4" + width="210.17955" + height="35.209244" + x="108.01281" + y="605.5506" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0,-1,1,0,-313.39862,891.55835)" + id="g5650-2-0-4-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87" + width="210.17955" + height="35.209244" + x="108.01281" + y="770.83313" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,261.76354,-143.71473)" + id="g5650-2-2-8"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-4" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="253.76691" + y="112.69559" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(530.58261,-183.7816)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.38774" + y="462.30475" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="213.38774" + y="462.30475">delete_completed</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.93852" + y="627.56927" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="212.93852" + y="627.56927">has response body?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="359.14185" + y="50.482433" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="359.14185" + y="50.482433" + id="tspan17171">conneg</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.77055" + y="792.62915" + id="text5371-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="212.77055" + y="792.62915">multiple_choices</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="358.52466" + y="134.49161" + id="text5371-2-95" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="358.52466" + y="134.49161">resource_exists</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.08696" + y="297.26282" + id="text5371-2-32" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="213.08696" + y="297.26282">delete_resource</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="251.83722" + y="175.92931" + id="text5371-2-391" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="251.83722" + y="175.92931">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="159.54012" + y="835.54285" + id="text5371-2-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3" + x="159.54012" + y="835.54285">false</tspan></text> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="447.26678" + y="176.39024" + id="text5371-4-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="447.26678" + y="176.39024">false</tspan></text> + <g + transform="translate(563.72619,-141.76777)" + id="g5650-2-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + <g + transform="matrix(0,-1,1,0,-508.93096,565.23553)" + id="g5650-2-0-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="47.338913" + y="876.22211" + id="text5371-4-3-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9" + x="47.338913" + y="876.22211">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="545.12921" + y="257.43518" + id="text5371-4-4-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6" + x="545.12921" + y="257.43518">true</tspan></text> + <g + transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,547.47379,-62.310424)" + id="g5650-9-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7-6" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355-0" + transform="translate(384.82851,-20.897068)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.38774" + y="216.5154" + id="text5371-4-0-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="213.38774" + y="216.5154" + id="tspan17171-6">cond</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-1" + width="218.52127" + height="34.993004" + x="99.803589" + y="935.6217" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="208.84938" + y="957.53229" + id="text5371-43-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-62" + x="208.84938" + y="957.53229">300 multiple choices</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8" + width="218.52127" + height="34.993004" + x="99.803589" + y="853.22168" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="208.31422" + y="876.54242" + id="text5371-43-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1" + x="208.31422" + y="876.54242">200 OK</tspan></text> + <g + transform="matrix(0,-1,-1,0,1028.2004,317.70407)" + id="g5650-2-0-4-3-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-4" + width="210.17955" + height="35.209244" + x="400.85385" + y="192.94594" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.77957" + y="216.51541" + id="text5371-2-32-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-8" + x="505.77957" + y="216.51541">has if-match?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="299.27689" + id="text5371-2-391-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7" + x="651.74426" + y="299.27689">false</tspan></text> + <g + transform="translate(563.72619,22.800669)" + id="g5650-0-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1027.6701,482.30508)" + id="g5650-2-0-4-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-7" + width="210.17955" + height="35.209244" + x="400.85385" + y="357.98779" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.94363" + y="379.78381" + id="text5371-2-32-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-1" + x="505.94363" + y="379.78381">previously_existed</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5" + width="218.52127" + height="34.993004" + x="396.68301" + y="440.37622" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="506.2796" + y="463.83755" + id="text5371-43-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9" + x="506.2796" + y="463.83755">404 not found</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="528.75421" + y="422.69736" + id="text5371-2-8-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4" + x="528.75421" + y="422.69736">false</tspan></text> + <g + transform="translate(563.72619,187.85116)" + id="g5650-2-2-17"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-0" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-45" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1027.4933,646.81763)" + id="g5650-2-0-4-3-8-0-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9" + width="210.17955" + height="35.209244" + x="400.85385" + y="523.02966" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.45535" + y="544.82568" + id="text5371-2-74-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2" + x="505.45535" + y="544.82568">moved_permanently</tspan></text> + <g + transform="matrix(0,-1,-1,0,347.00351,567.35686)" + id="g5650-2-0-4-3-8-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-3" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="218.52127" + height="34.993004" + x="396.68301" + y="275.81555" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="506.2796" + y="297.7261" + id="text5371-43" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="506.2796" + y="297.7261">412 precondition failed</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="668.11926" + y="463.37662" + id="text5371-4-3-9-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9-9" + x="668.11926" + y="463.37662">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="549.12921" + y="587.59863" + id="text5371-4-4-9-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2" + x="549.12921" + y="587.59863">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="628.87946" + id="text5371-2-391-5-5-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9" + x="651.74426" + y="628.87946">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9" + width="218.52127" + height="34.993004" + x="396.68301" + y="605.41809" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.57257" + y="627.32867" + id="text5371-43-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7" + x="505.57257" + y="627.32867">301 moved permanently</tspan></text> + <g + transform="translate(563.72619,353.12604)" + id="g5650-2-2-65"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-5" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1032.2004,811.50699)" + id="g5650-2-0-4-3-8-0-3-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8-1" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1" + width="210.17955" + height="35.209244" + x="400.85385" + y="687.83093" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.45535" + y="709.62695" + id="text5371-2-74-0-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8" + x="505.45535" + y="709.62695">moved_temporarily</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="549.12921" + y="752.64056" + id="text5371-4-4-9-3-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2-6" + x="549.12921" + y="752.64056">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="794.16199" + id="text5371-2-391-5-5-1-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9-2" + x="651.74426" + y="794.16199">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2" + width="218.52127" + height="34.993004" + x="396.68301" + y="770.70062" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.57257" + y="792.61121" + id="text5371-43-2-9-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8" + x="505.57257" + y="792.61121">307 moved temporarily</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2-4" + width="218.52127" + height="34.993004" + x="396.68301" + y="853.22168" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.97882" + y="874.99164" + id="text5371-43-2-9-7-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8-7" + x="505.97882" + y="874.99164">410 gone</tspan></text> + <g + transform="translate(31.619614,4.2328831)" + id="g5650-2-2-6"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="178.57137" + y="505.21829" + id="text5371-4-6-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0-9" + x="178.57137" + y="505.21829">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7" + width="218.52127" + height="34.993004" + x="99.803589" + y="522.89716" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="209.20485" + y="544.80774" + id="text5371-43-3-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-5" + x="209.20485" + y="544.80774">202 accepted</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-5" + width="218.52127" + height="34.993004" + x="99.803589" + y="687.69843" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="208.6736" + y="711.01917" + id="text5371-43-3-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-8" + x="208.6736" + y="711.01917">204 no content</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="47.338913" + y="711.15979" + id="text5371-4-6-0-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0-9-4" + x="47.338913" + y="711.15979">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="30.901413" + y="545.89758" + id="text5371-2-391-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-9" + x="30.901413" + y="545.89758">true</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7-1" + width="218.52127" + height="34.993004" + x="99.803589" + y="357.85529" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="208.45485" + y="381.31662" + id="text5371-43-3-1-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-5-9" + x="208.45485" + y="381.31662">500 internal server error</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="159.54012" + y="340.17645" + id="text5371-2-8-9-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-4" + x="159.54012" + y="340.17645">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="47.338913" + y="380.85568" + id="text5371-4-4-9-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-1" + x="47.338913" + y="380.85568">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="159.54012" + y="670.13989" + id="text5371-2-391-6-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-9-1" + x="159.54012" + y="670.13989">false</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_flowcharts/index.html b/_build/static/docs/en/cowboy/1.0/guide/rest_flowcharts/index.html new file mode 100644 index 00000000..24208561 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_flowcharts/index.html @@ -0,0 +1,304 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>REST flowcharts</span></h1> + +<p>This chapter will explain the REST handler state machine through a number of different diagrams.</p> + +<p>There are four main paths that requests may follow. One for the method OPTIONS; one for the methods GET and HEAD; one for the methods PUT, POST and PATCH; and one for the method DELETE.</p> + +<p>All paths start with the "Start" diagram, and all paths excluding the OPTIONS path go through the "Content negotiation" diagram and optionally the "Conditional requests" diagram if the resource exists.</p> + +<p>The red squares refer to another diagram. The light green squares indicate a response. Other squares may be either a callback or a question answered by Cowboy itself. Green arrows tend to indicate the default behavior if the callback is undefined.</p> + +<h2 id="start">Start</h2> + +<p>All requests start from here.</p> + +<p><img title="REST starting flowchart" src="/docs/en/cowboy/1.0/guide/rest_start.png"/></p> + +<p>A series of callbacks are called in succession to perform a general checkup of the service, the request line and request headers.</p> + +<p>The request body, if any, is not expected to have been received for any of these steps. It is only processed at the end of the "PUT, POST and PATCH methods" diagram, when all conditions have been met.</p> + +<p>The <code>known_methods</code> and <code>allowed_methods</code> callbacks return a list of methods. Cowboy then checks if the request method is in the list, and stops otherwise.</p> + +<p>The <code>is_authorized</code> callback may be used to check that access to the resource is authorized. Authentication may also be performed as needed. When authorization is denied, the return value from the callback must include a challenge applicable to the requested resource, which will be sent back to the client in the www-authenticate header.</p> + +<p>This diagram is immediately followed by either the "OPTIONS method" diagram when the request method is OPTIONS, or the "Content negotiation" diagram otherwise.</p> + +<h2 id="options_method">OPTIONS method</h2> + +<p>This diagram only applies to OPTIONS requests.</p> + +<p><img title="REST OPTIONS method flowchart" src="/docs/en/cowboy/1.0/guide/rest_options.png"/></p> + +<p>The <code>options</code> callback may be used to add information about the resource, such as media types or languages provided; allowed methods; any extra information. A response body may also be set, although clients should not be expected to read it.</p> + +<p>If the <code>options</code> callback is not defined, Cowboy will send a response containing the list of allowed methods by default.</p> + +<h2 id="content_negotiation">Content negotiation</h2> + +<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the "Start" diagram is completed.</p> + +<p><img title="REST content negotiation flowchart" src="/docs/en/cowboy/1.0/guide/rest_conneg.png"/></p> + +<p>The purpose of these steps is to determine an appropriate representation to be sent back to the client.</p> + +<p>The request may contain any of the accept header; the accept-language header; or the accept-charset header. When present, Cowboy will parse the headers and then call the corresponding callback to obtain the list of provided content-type, language or charset for this resource. It then automatically select the best match based on the request.</p> + +<p>If a callback is not defined, Cowboy will select the content-type, language or charset that the client prefers.</p> + +<p>The <code>content_types_provided</code> also returns the name of a callback for every content-type it accepts. This callback will only be called at the end of the "GET and HEAD methods" diagram, when all conditions have been met.</p> + +<p>The selected content-type, language and charset are saved as meta values in the Req object. You <em>should</em> use the appropriate representation if you set a response body manually (alongside an error code, for example).</p> + +<p>This diagram is immediately followed by the "GET and HEAD methods" diagram, the "PUT, POST and PATCH methods" diagram, or the "DELETE method" diagram, depending on the method.</p> + +<h2 id="get_and_head_methods">GET and HEAD methods</h2> + +<p>This diagram only applies to GET and HEAD requests.</p> + +<p>For a description of the <code>cond</code> step, please see the "Conditional requests" diagram.</p> + +<p><img title="REST GET/HEAD methods flowchart" src="/docs/en/cowboy/1.0/guide/rest_get_head.png"/></p> + +<p>When the resource exists, and the conditional steps succeed, the resource can be retrieved.</p> + +<p>Cowboy prepares the response by first retrieving metadata about the representation, then by calling the <code>ProvideResource</code> callback. This is the callback you defined for each content-types you returned from <code>content_types_provided</code>. This callback returns the body that will be sent back to the client, or a fun if the body must be streamed.</p> + +<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p> + +<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p> + +<h2 id="put,_post_and_patch_methods">PUT, POST and PATCH methods</h2> + +<p>This diagram only applies to PUT, POST and PATCH requests.</p> + +<p>For a description of the <code>cond</code> step, please see the "Conditional requests" diagram.</p> + +<p><img title="REST PUT/POST/PATCH methods flowchart" src="/docs/en/cowboy/1.0/guide/rest_put_post_patch.png"/></p> + +<p>When the resource exists, first the conditional steps are executed. When that succeeds, and the method is PUT, Cowboy will call the <code>is_conflict</code> callback. This function can be used to prevent potential race conditions, by locking the resource for example.</p> + +<p>Then all three methods reach the <code>content_types_accepted</code> step that we will describe in a few paragraphs.</p> + +<p>When the resource does not exist, and the method is PUT, Cowboy will check for conflicts and then move on to the <code>content_types_accepted</code> step. For other methods, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere. If the resource is truly non-existent, the method is POST and the call for <code>allow_missing_post</code> returns <code>true</code>, then Cowboy will move on to the <code>content_types_accepted</code> step. Otherwise the request processing ends there.</p> + +<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p> + +<p>The <code>content_types_accepted</code> returns a list of content-types it accepts, but also the name of a callback for each of them. Cowboy will select the appropriate callback for processing the request body and call it.</p> + +<p>This callback may return one of three different return values.</p> + +<p>If an error occurred while processing the request body, it must return <code>false</code> and Cowboy will send an appropriate error response.</p> + +<p>If the method is POST, then you may return <code>true</code> with an URI of where the resource has been created. This is especially useful for writing handlers for collections.</p> + +<p>Otherwise, return <code>true</code> to indicate success. Cowboy will select the appropriate response to be sent depending on whether a resource has been created, rather than modified, and on the availability of a location header or a body in the response.</p> + +<h2 id="delete_method">DELETE method</h2> + +<p>This diagram only applies to DELETE requests.</p> + +<p>For a description of the <code>cond</code> step, please see the "Conditional requests" diagram.</p> + +<p><img title="REST DELETE method flowchart" src="/docs/en/cowboy/1.0/guide/rest_delete.png"/></p> + +<p>When the resource exists, and the conditional steps succeed, the resource can be deleted.</p> + +<p>Deleting the resource is a two steps process. First the callback <code>delete_resource</code> is executed. Use this callback to delete the resource.</p> + +<p>Because the resource may be cached, you must also delete all cached representations of this resource in the system. This operation may take a while though, so you may return before it finished.</p> + +<p>Cowboy will then call the <code>delete_completed</code> callback. If you know that the resource has been completely deleted from your system, including from caches, then you can return <code>true</code>. If any doubts persist, return <code>false</code>. Cowboy will assume <code>true</code> by default.</p> + +<p>To finish, Cowboy checks if you set a response body, and depending on that, sends the appropriate response.</p> + +<p>When the resource does not exist, Cowboy will figure out whether the resource existed previously, and if so whether it was moved elsewhere in order to redirect the client to the new URI.</p> + +<p>The <code>moved_permanently</code> and <code>moved_temporarily</code> callbacks must return the new location of the resource if it was in fact moved.</p> + +<h2 id="conditional_requests">Conditional requests</h2> + +<p>This diagram applies to all request methods other than OPTIONS. It is executed right after the <code>resource_exists</code> callback, when the resource exists.</p> + +<p><img title="REST conditional requests flowchart" src="/docs/en/cowboy/1.0/guide/rest_cond.png"/></p> + +<p>A request becomes conditional when it includes either of the if-match header; the if-unmodified-since header; the if-none-match header; or the if-modified-since header.</p> + +<p>If the condition fails, the request ends immediately without any retrieval or modification of the resource.</p> + +<p>The <code>generate_etag</code> and <code>last_modified</code> are called as needed. Cowboy will only call them once and then cache the results for subsequent use.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.png b/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.png Binary files differnew file mode 100644 index 00000000..efee892a --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.svg new file mode 100644 index 00000000..c78e9399 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_get_head.svg @@ -0,0 +1,1523 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_get_head.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.4142136" + inkscape:cx="122.28875" + inkscape:cy="777.29526" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(416.63925,-305.0045)" + id="g5650-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,-59.451492)" + id="g5650-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,22.975441)" + id="g5650-94" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-71" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,105.29639)" + id="g5650-93" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,187.81342)" + id="g5650-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-93" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-04" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,270.7128)" + id="g5650-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(270.88515,-141.93971)" + id="g5650-0-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="108.01281" + y="275.4668" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-5" + width="210.17955" + height="35.209244" + x="108.01281" + y="357.98779" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8" + width="210.17955" + height="35.209244" + x="108.01281" + y="440.50873" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4" + width="210.17955" + height="35.209244" + x="108.01281" + y="523.02966" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0,-1,1,0,-314.06239,730.23773)" + id="g5650-2-0-4-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87" + width="210.17955" + height="35.209244" + x="108.01281" + y="605.5506" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,261.76354,-143.71473)" + id="g5650-2-2-8"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-4" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="253.76691" + y="112.69559" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(530.58261,-183.7816)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.07524" + y="379.78381" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="213.07524" + y="379.78381">last_modified</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.74321" + y="546.59912" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="212.74321" + y="546.59912">ProvideResource</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="359.14185" + y="50.482433" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="359.14185" + y="50.482433" + id="tspan17171">conneg</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.77055" + y="627.34662" + id="text5371-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="212.77055" + y="627.34662">multiple_choices</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="358.52466" + y="134.49161" + id="text5371-2-95" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="358.52466" + y="134.49161">resource_exists</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.38774" + y="296.80188" + id="text5371-2-32" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="213.38774" + y="296.80188">generate_etag</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.05571" + y="462.5274" + id="text5371-2-74" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18" + x="213.05571" + y="462.5274">expires</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="251.83722" + y="175.92931" + id="text5371-2-391" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="251.83722" + y="175.92931">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="161.54012" + y="670.38055" + id="text5371-2-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3" + x="161.54012" + y="670.38055">false</tspan></text> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="447.26678" + y="176.39024" + id="text5371-4-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="447.26678" + y="176.39024">false</tspan></text> + <g + transform="translate(563.72619,-141.76777)" + id="g5650-2-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + <g + transform="matrix(0,-1,1,0,-508.93096,565.23553)" + id="g5650-2-0-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="46.409981" + y="711.18011" + id="text5371-4-3-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9" + x="46.409981" + y="711.18011">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="545.12921" + y="257.43518" + id="text5371-4-4-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6" + x="545.12921" + y="257.43518">true</tspan></text> + <g + transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,547.47379,-62.310424)" + id="g5650-9-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7-6" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355-0" + transform="translate(384.82851,-20.897068)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="213.38774" + y="216.5154" + id="text5371-4-0-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="213.38774" + y="216.5154" + id="tspan17171-6">cond</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-1" + width="218.52127" + height="34.993004" + x="103.84195" + y="770.70062" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.88774" + y="792.61121" + id="text5371-43-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-62" + x="212.88774" + y="792.61121">300 multiple choices</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8" + width="218.52127" + height="34.993004" + x="103.84195" + y="688.17969" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="212.35258" + y="711.50043" + id="text5371-43-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1" + x="212.35258" + y="711.50043">200 OK</tspan></text> + <g + transform="matrix(0,-1,-1,0,1028.2004,317.70407)" + id="g5650-2-0-4-3-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-4" + width="210.17955" + height="35.209244" + x="400.85385" + y="192.94594" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.77957" + y="216.51541" + id="text5371-2-32-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-8" + x="505.77957" + y="216.51541">has if-match?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="299.27689" + id="text5371-2-391-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7" + x="651.74426" + y="299.27689">false</tspan></text> + <g + transform="translate(563.72619,22.800669)" + id="g5650-0-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1027.6701,482.30508)" + id="g5650-2-0-4-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-7" + width="210.17955" + height="35.209244" + x="400.85385" + y="357.98779" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.94363" + y="379.78381" + id="text5371-2-32-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-1" + x="505.94363" + y="379.78381">previously_existed</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5" + width="218.52127" + height="34.993004" + x="396.68301" + y="440.37622" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="506.2796" + y="463.83755" + id="text5371-43-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9" + x="506.2796" + y="463.83755">404 not found</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="528.75421" + y="422.69736" + id="text5371-2-8-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4" + x="528.75421" + y="422.69736">false</tspan></text> + <g + transform="translate(563.72619,187.85116)" + id="g5650-2-2-17"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-0" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-45" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1027.4933,646.81763)" + id="g5650-2-0-4-3-8-0-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9" + width="210.17955" + height="35.209244" + x="400.85385" + y="523.02966" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.45535" + y="544.82568" + id="text5371-2-74-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2" + x="505.45535" + y="544.82568">moved_permanently</tspan></text> + <g + transform="matrix(0,-1,-1,0,347.00351,567.35686)" + id="g5650-2-0-4-3-8-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-3" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="218.52127" + height="34.993004" + x="396.68301" + y="275.81555" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="506.2796" + y="297.7261" + id="text5371-43" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="506.2796" + y="297.7261">412 precondition failed</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="668.11926" + y="463.37662" + id="text5371-4-3-9-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-62-9-9" + x="668.11926" + y="463.37662">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="549.12921" + y="587.59863" + id="text5371-4-4-9-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2" + x="549.12921" + y="587.59863">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="628.87946" + id="text5371-2-391-5-5-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9" + x="651.74426" + y="628.87946">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9" + width="218.52127" + height="34.993004" + x="396.68301" + y="605.41809" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.57257" + y="627.32867" + id="text5371-43-2-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7" + x="505.57257" + y="627.32867">301 moved permanently</tspan></text> + <g + transform="translate(563.72619,353.12604)" + id="g5650-2-2-65"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-5" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,1032.2004,811.50699)" + id="g5650-2-0-4-3-8-0-3-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8-1" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1" + width="210.17955" + height="35.209244" + x="400.85385" + y="687.83093" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.45535" + y="709.62695" + id="text5371-2-74-0-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8" + x="505.45535" + y="709.62695">moved_temporarily</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="549.12921" + y="752.64056" + id="text5371-4-4-9-3-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2-6" + x="549.12921" + y="752.64056">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="651.74426" + y="794.16199" + id="text5371-2-391-5-5-1-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9-2" + x="651.74426" + y="794.16199">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2" + width="218.52127" + height="34.993004" + x="396.68301" + y="770.70062" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.57257" + y="792.61121" + id="text5371-43-2-9-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8" + x="505.57257" + y="792.61121">307 moved temporarily</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2-4" + width="218.52127" + height="34.993004" + x="396.68301" + y="853.22168" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="505.97882" + y="874.99164" + id="text5371-43-2-9-7-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8-7" + x="505.97882" + y="874.99164">410 gone</tspan></text> + <g + transform="translate(31.619614,4.2328831)" + id="g5650-2-2-6"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_handlers/index.html b/_build/static/docs/en/cowboy/1.0/guide/rest_handlers/index.html new file mode 100644 index 00000000..69f2b001 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_handlers/index.html @@ -0,0 +1,289 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>REST handlers</span></h1> + +<p>REST is implemented in Cowboy as a protocol upgrade. Once upgraded, the request is handled as a state machine with many optional callbacks describing the resource and modifying the machine's behavior.</p> + +<p>The REST handler is the recommended way to handle requests.</p> + +<h2 id="initialization">Initialization</h2> + +<p>First, the <code>init/3</code> callback is called. This callback is common to all handlers. To use REST for the current request, this function must return an <code>upgrade</code> tuple.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init({tcp, http}, Req, Opts) -> + {upgrade, protocol, cowboy_rest}. +]]></script> + +<p>Cowboy will then switch to the REST protocol and start executing the state machine, starting from <code>rest_init/2</code> if it's defined, and ending with <code>rest_terminate/2</code> also if defined.</p> + +<h2 id="methods">Methods</h2> + +<p>The REST component has code for handling the following HTTP methods: HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p> + +<p>Other methods can be accepted, however they have no specific callback defined for them at this time.</p> + +<h2 id="callbacks">Callbacks</h2> + +<p>All callbacks are optional. Some may become mandatory depending on what other defined callbacks return. The various flowcharts in the next chapter should be a useful to determine which callbacks you need.</p> + +<p>When the request starts being processed, Cowboy will call the <code>rest_init/2</code> function if it is defined, with the Req object and the handler options as arguments. This function must return <code>{ok, Req, State}</code> where <code>State</code> is the handler's state that all subsequent callbacks will receive.</p> + +<p>At the end of every request, the special callback <code>rest_terminate/2</code> will be called if it is defined. It cannot be used to send a reply, and must always return <code>ok</code>.</p> + +<p>All other callbacks are resource callbacks. They all take two arguments, the Req object and the State, and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p> + +<p>The following table summarizes the callbacks and their default values. If the callback isn't defined, then the default value will be used. Please look at the flowcharts to find out the result of each return value.</p> + +<p>All callbacks can also return <code>{halt, Req, State}</code> to stop execution of the request, at which point <code>rest_terminate/2</code> will be called.</p> + +<p>In the following table, "skip" means the callback is entirely skipped if it is undefined, moving directly to the next step. Similarly, "none" means there is no default value for this callback.</p> + +<table class="table-bordered table-condensed table-striped"> +<thead> +<tr><th>Callback name</th><th>Default value</th></tr> +</thead> +<tbody> +<tr><td>allowed_methods</td><td><code>[<<"GET">>, <<"HEAD">>, <<"OPTIONS">>]</code></td></tr> +<tr><td>allow_missing_post</td><td><code>true</code></td></tr> +<tr><td>charsets_provided</td><td>skip</td></tr> +<tr><td>content_types_accepted</td><td>none</td></tr> +<tr><td>content_types_provided</td><td><code>[{{<<"text">>, <<"html">>, '*'}, to_html}] </code></td></tr> +<tr><td>delete_completed</td><td><code>true</code></td></tr> +<tr><td>delete_resource</td><td><code>false</code></td></tr> +<tr><td>expires</td><td><code>undefined</code></td></tr> +<tr><td>forbidden</td><td><code>false</code></td></tr> +<tr><td>generate_etag</td><td><code>undefined</code></td></tr> +<tr><td>is_authorized</td><td><code>true</code></td></tr> +<tr><td>is_conflict</td><td><code>false</code></td></tr> +<tr><td>known_content_type</td><td><code>true</code></td></tr> +<tr><td>known_methods</td><td><code>[<<"GET">>, <<"HEAD">>, <<"POST">>, <<"PUT">>, <<"PATCH">>, <<"DELETE">>, <<"OPTIONS">>]</code></td></tr> +<tr><td>languages_provided</td><td>skip</td></tr> +<tr><td>last_modified</td><td><code>undefined</code></td></tr> +<tr><td>malformed_request</td><td><code>false</code></td></tr> +<tr><td>moved_permanently</td><td><code>false</code></td></tr> +<tr><td>moved_temporarily</td><td><code>false</code></td></tr> +<tr><td>multiple_choices</td><td><code>false</code></td></tr> +<tr><td>options</td><td><code>ok</code></td></tr> +<tr><td>previously_existed</td><td><code>false</code></td></tr> +<tr><td>resource_exists</td><td><code>true</code></td></tr> +<tr><td>service_available</td><td><code>true</code></td></tr> +<tr><td>uri_too_long</td><td><code>false</code></td></tr> +<tr><td>valid_content_headers</td><td><code>true</code></td></tr> +<tr><td>valid_entity_length</td><td><code>true</code></td></tr> +<tr><td>variances</td><td><code>[]</code></td></tr> +</tbody> +</table> + +<p>As you can see, Cowboy tries to move on with the request whenever possible by using well thought out default values.</p> + +<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> + +<h2 id="meta_data">Meta data</h2> + +<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> + +<table class="table-bordered table-condensed table-striped"> +<thead> +<tr><th>Meta key</th><th>Details</th></tr> +</thead> +<tbody> +<tr><td>media_type</td><td>The content-type negotiated for the response entity.</td></tr> +<tr><td>language</td><td>The language negotiated for the response entity.</td></tr> +<tr><td>charset</td><td>The charset negotiated for the response entity.</td></tr> +</tbody> +</table> + +<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> + +<h2 id="response_headers">Response headers</h2> + +<p>Cowboy will set response headers automatically over the execution of the REST code. They are listed in the following table.</p> + +<table class="table-bordered table-condensed table-striped"> +<thead> +<tr><th>Header name</th><th>Details</th></tr> +</thead> +<tbody> +<tr><td>content-language</td><td>Language used in the response body</td></tr> +<tr><td>content-type</td><td>Media type and charset of the response body</td></tr> +<tr><td>etag</td><td>Etag of the resource</td></tr> +<tr><td>expires</td><td>Expiration date of the resource</td></tr> +<tr><td>last-modified</td><td>Last modification date for the resource</td></tr> +<tr><td>location</td><td>Relative or absolute URI to the requested resource</td></tr> +<tr><td>vary</td><td>List of headers that may change the representation of the resource</td></tr> +</tbody> +</table> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_options.png b/_build/static/docs/en/cowboy/1.0/guide/rest_options.png Binary files differnew file mode 100644 index 00000000..90fd6f06 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_options.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_options.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_options.svg new file mode 100644 index 00000000..496c050c --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_options.svg @@ -0,0 +1,387 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_options.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.0000001" + inkscape:cx="166.77748" + inkscape:cy="548.36436" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(205.92143,-296.03137)" + id="g5650-7"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,-212.00698)" + id="g5650-9"> + <path + inkscape:connector-curvature="0" + id="path5570-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="43.049091" + y="204.67757" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="43.049091" + y="121.0042" + rx="15" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(319.86479,-176.50006)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.00391" + y="60.912468" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="147.00391" + y="60.912468" + id="tspan17171">start</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.13106" + y="142.80627" + id="text5371-2-95" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="148.13106" + y="142.80627">options</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.80684" + y="226.4736" + id="text5371-2-32" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="147.80684" + y="226.4736">200 OK</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_principles/index.html b/_build/static/docs/en/cowboy/1.0/guide/rest_principles/index.html new file mode 100644 index 00000000..0be16d14 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_principles/index.html @@ -0,0 +1,238 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>REST principles</span></h1> + +<p>This chapter will attempt to define the concepts behind REST and explain what makes a service RESTful.</p> + +<p>REST is often confused with performing a distinct operation depending on the HTTP method, while using more than the GET and POST methods. That's highly misguided at best.</p> + +<p>We will first attempt to define REST and will look at what it means in the context of HTTP and the Web. For a more in-depth explanation of REST, you can read <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">Roy T. Fielding's dissertation</a> as it does a great job explaining where it comes from and what it achieves.</p> + +<h2 id="rest_architecture">REST architecture</h2> + +<p>REST is a <em>client-server</em> architecture. The client and the server both have a different set of concerns. The server stores and/or manipulates information and makes it available to the user in an efficient manner. The client takes that information and displays it to the user and/or uses it to perform subsequent requests for information. This separation of concerns allows both the client and the server to evolve independently as it only requires that the interface stays the same.</p> + +<p>REST is <em>stateless</em>. That means the communication between the client and the server always contains all the information needed to perform the request. There is no session state in the server, it is kept entirely on the client's side. If access to a resource requires authentication, then the client needs to authenticate itself with every request.</p> + +<p>REST is <em>cacheable</em>. The client, the server and any intermediary components can all cache resources in order to improve performance.</p> + +<p>REST provides a <em>uniform interface</em> between components. This simplifies the architecture, as all components follow the same rules to speak to one another. It also makes it easier to understand the interactions between the different components of the system. A number of constraints are required to achieve this. They are covered in the rest of the chapter.</p> + +<p>REST is a <em>layered system</em>. Individual components cannot see beyond the immediate layer with which they are interacting. This means that a client connecting to an intermediate component, like a proxy, has no knowledge of what lies beyond. This allows components to be independent and thus easily replaceable or extendable.</p> + +<p>REST optionally provides <em>code on demand</em>. Code may be downloaded to extend client functionality. This is optional however because the client may not be able to download or run this code, and so a REST component cannot rely on it being executed.</p> + +<h2 id="resources_and_resource_identifiers">Resources and resource identifiers</h2> + +<p>A resource is an abstract concept. In a REST system, any information that can be named may be a resource. This includes documents, images, a collection of resources and any other information. Any information that can be the target of an hypertext link can be a resource.</p> + +<p>A resource is a conceptual mapping to a set of entities. The set of entities evolves over time; a resource doesn't. For example a resource can map to "users who have logged in this past month" and another to "all users". At some point in time they may map to the same set of entities, because all users logged in this past month. But they are still different resources. Similarly, if nobody logged in recently, then the first resource may map to the empty set. This resource exists regardless of the information it maps to.</p> + +<p>Resources are identified by uniform resource identifiers, also known as URIs. Sometimes internationalized resource identifiers, or IRIs, may also be used, but these can be directly translated into a URI.</p> + +<p>In practice we will identify two kinds of resources. Individual resources map to a set of one element, for example "user Joe". Collection of resources map to a set of 0 to N elements, for example "all users".</p> + +<h2 id="resource_representations">Resource representations</h2> + +<p>The representation of a resource is a sequence of bytes associated with metadata.</p> + +<p>The metadata comes as a list of key-value pairs, where the name corresponds to a standard that defines the value's structure and semantics. With HTTP, the metadata comes in the form of request or response headers. The headers' structure and semantics are well defined in the HTTP standard. Metadata includes representation metadata, resource metadata and control data.</p> + +<p>The representation metadata gives information about the representation, such as its media type, the date of last modification, or even a checksum.</p> + +<p>Resource metadata could be link to related resources or information about additional representations of the resource.</p> + +<p>Control data allows parameterizing the request or response. For example, we may only want the representation returned if it is more recent than the one we have in cache. Similarly, we may want to instruct the client about how it should cache the representation. This isn't restricted to caching. We may for example want to store a new representation of a resource only if it wasn't modified since we first retrieved it.</p> + +<p>The data format of a representation is also known as the media type. Some media types are intended for direct rendering to the user, while others are intended for automated processing. The media type is a key component of the REST architecture.</p> + +<h2 id="self-descriptive_messages">Self-descriptive messages</h2> + +<p>Messages must be self-descriptive. That means that the data format of a representation must always come with its media type (and similarly requesting a resource involves choosing the media type of the representation returned). If you are sending HTML, then you must say it is HTML by sending the media type with the representation. In HTTP this is done using the content-type header.</p> + +<p>The media type is often an IANA registered media type, like <code>text/html</code> or <code>image/png</code>, but does not need to be. Exactly two things are important for respecting this constraint: that the media type is well specified, and that the sender and recipient agree about what the media type refers to.</p> + +<p>This means that you can create your own media types, like <code>application/x-mine</code>, and that as long as you write the specifications for it and that both endpoints agree about it then the constraint is respected.</p> + +<h2 id="hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2> + +<p>The last constraint is generally where services that claim to be RESTful fail. Interactions with a server must be entirely driven by hypermedia. The client does not need any prior knowledge of the service in order to use it, other than an entry point and of course basic understanding of the media type of the representations, at the very least enough to find and identify hyperlinks and link relations.</p> + +<p>To give a simple example, if your service only works with the <code>application/json</code> media type then this constraint cannot be respected (as there are no concept of links in JSON) and thus your service isn't RESTful. This is the case for the majority of self-proclaimed REST services.</p> + +<p>On the other hand if you create a JSON based media type that has a concept of links and link relations, then your service might be RESTful.</p> + +<p>Respecting this constraint means that the entirety of the service becomes self-discoverable, not only the resources in it, but also the operations you can perform on it. This makes clients very thin as there is no need to implement anything specific to the service to operate on it.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.png b/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.png Binary files differnew file mode 100644 index 00000000..4afca9e9 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.svg new file mode 100644 index 00000000..263cc942 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_put_post_patch.svg @@ -0,0 +1,2856 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448" + height="1052.3622" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_put_post_patch.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="2" + inkscape:cx="299.56028" + inkscape:cy="-395.99137" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,1.5472441e-4)"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(370.63925,-305.0045)" + id="g5650-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,215.76354,-143.71473)" + id="g5650-2-2-8"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-4" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="207.76691" + y="112.69559" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g5650" + transform="translate(229.41793,93.569228)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(484.58261,-183.7816)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="313.14185" + y="50.482433" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="313.14185" + y="50.482433" + id="tspan17171">conneg</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="312.52466" + y="134.49161" + id="text5371-2-95" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="312.52466" + y="134.49161">resource_exists</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="205.83722" + y="175.92931" + id="text5371-2-391" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="205.83722" + y="175.92931">true</tspan></text> + <g + transform="matrix(0,-1,1,0,-586.85324,629.53436)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="401.26678" + y="176.39024" + id="text5371-4-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="401.26678" + y="176.39024">false</tspan></text> + <g + transform="translate(517.41793,-144.94975)" + id="g5650-2-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + <g + transform="matrix(0,-1,1,0,-508.93096,565.23553)" + id="g5650-2-0-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="496.12921" + y="255.81152" + id="text5371-4-4-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6" + x="496.12921" + y="255.81152">true</tspan></text> + <g + transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,501.47379,-62.310424)" + id="g5650-9-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7-6" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(-0.08419269,-0.81571201,-1.0857893,-0.07785618,667.56845,424.75412)" + id="g5650-2-0-4-3-8-9-2" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g6634"> + <path + inkscape:connector-curvature="0" + id="path20172-9-8-9-3-7" + d="m 18.652036,463.77088 c 0,0 65.81835,-170.39134 345.869384,-106.32083" + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(-0.44664484,-0.38224114,-0.38224114,0.44664484,110.28192,145.11277)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-1-5-3-0" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="matrix(0,-1,1,0,-443.10758,753.30201)" + id="g5650-2-0-4-3-8-9-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:1.98598707;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 530.36552,568.78955 c 0,0 -275.73145,-235.65993 -602.761737,-30.40772" + id="path20172-9-8-9-3-1" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.29887498,0.50623478,-0.50623478,0.29887498,210.13685,523.56774)" + inkscape:transform-center-y="-0.81224338" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-1-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="5.134315" /> + </g> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355-0" + transform="translate(343.36129,-20.897068)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="171.92052" + y="216.5154" + id="text5371-4-0-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="171.92052" + y="216.5154" + id="tspan17171-6">cond</tspan></text> + <g + transform="matrix(0,-1,-1,0,983.2611,313.28465)" + id="g5650-2-0-4-3-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-4" + width="210.17955" + height="35.209244" + x="354.54559" + y="192.94588" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.47131" + y="216.51535" + id="text5371-2-32-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-8" + x="459.47131" + y="216.51535">has if-match?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="609.12769" + y="296.02957" + id="text5371-2-391-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7" + x="609.12769" + y="296.02957">false</tspan></text> + <g + transform="translate(517.41793,13.785058)" + id="g5650-0-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-7" + width="210.17955" + height="35.209244" + x="354.54559" + y="351.97443" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.47131" + y="374.91498" + id="text5371-2-32-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-1" + x="459.47131" + y="374.91498">method is POST/PATCH?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="479.69171" + y="414.84009" + id="text5371-2-8-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4" + x="479.69171" + y="414.84009">true</tspan></text> + <g + transform="translate(517.41793,490.80719)" + id="g5650-0-6-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7-76" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3-7" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0.34202014,-0.93969262,-0.93969262,-0.34202014,1086.6042,1290.1092)" + id="g5650-2-0-4-0-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 152.42141,615.5283 c 0,0 -73.650807,-184.33554 -245.781275,54.61093" + id="path20172-9-3-4" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,178.4823,610.19901)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-0-2" + style="opacity:0.80000000000000004;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <g + transform="translate(517.41793,570.7504)" + id="g5650-2-2-2-7-5"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-62-7-7" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-9-5-8" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9" + width="210.17955" + height="35.209244" + x="354.54559" + y="908.57428" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="matrix(0,1,-1,0,694.44282,904.44724)" + id="g5650-2-2-6-6"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6-3" + d="m -57.78256,339.02801 0,65.70583" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-59" + width="210.17955" + height="35.209244" + x="354.54559" + y="829.06006" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.47131" + y="852.62952" + id="text5371-2-74-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2" + x="459.47131" + y="852.62952">method is POST?</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="218.52127" + height="34.993004" + x="350.37473" + y="272.56824" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.97131" + y="294.47879" + id="text5371-43" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="459.97131" + y="294.47879">412 precondition failed</tspan></text> + <g + transform="translate(2.6196148,3.2328831)" + id="g5650-2-2-6"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,1,-1,0,694.2803,507.19416)" + id="g5650-0-6-3" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7-7" + d="m -57.78256,340.48769 0,63.05283" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(517.41793,93.25206)" + id="g5650-2-2-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-62" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-9" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28-7-6" + width="210.17955" + height="35.209244" + x="354.54559" + y="431.48868" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.63538" + y="453.2847" + id="text5371-2-32-8-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-27-1-2" + x="459.63538" + y="453.2847">previously_existed</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-5" + width="218.52127" + height="34.993004" + x="62.374733" + y="590.76849" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="translate(229.41793,173.2314)" + id="g5650-2-2-2-7"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-62-7" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-9-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="171.97131" + y="614.22986" + id="text5371-43-2-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-74" + x="171.97131" + y="614.22986">404 not found</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="296.84631" + y="433.29703" + id="text5371-2-8-9-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-8" + x="296.84631" + y="433.29703">false</tspan></text> + <g + transform="translate(516.00372,173.10383)" + id="g5650-2-2-17-8"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-0-3" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-45-2" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,983.3517,631.45158)" + id="g5650-2-0-4-3-8-0-3-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8-9" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="500.12921" + y="574.2605" + id="text5371-4-4-9-3-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2-8" + x="500.12921" + y="574.2605">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="607.7135" + y="610.86951" + id="text5371-2-391-5-5-1-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9-5" + x="607.7135" + y="610.86951">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-29" + width="218.52127" + height="34.993004" + x="350.37473" + y="590.76849" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.26428" + y="612.67908" + id="text5371-43-2-9-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-5" + x="459.26428" + y="612.67908">301 moved permanently</tspan></text> + <g + transform="translate(517.41793,332.05687)" + id="g5650-2-2-65-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-5-9" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-5-9" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,982.4019,789.6002)" + id="g5650-2-0-4-3-8-0-3-7-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-31-8-1-6" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-3-6-3-2" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1-4" + width="210.17955" + height="35.209244" + x="354.54559" + y="670.03149" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.14709" + y="691.82751" + id="text5371-2-74-0-7-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8-9" + x="459.14709" + y="691.82751">moved_temporarily</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="500.12921" + y="733.21747" + id="text5371-4-4-9-3-2-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2-6-6" + x="500.12921" + y="733.21747">true*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="607.7135" + y="769.89801" + id="text5371-2-391-5-5-1-0-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9-2-8" + x="607.7135" + y="769.89801">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2-1" + width="218.52127" + height="34.993004" + x="350.37473" + y="749.65387" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.26428" + y="771.56445" + id="text5371-43-2-9-7-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8-9" + x="459.26428" + y="771.56445">307 moved temporarily</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2-4-1" + width="218.52127" + height="34.993004" + x="495.25732" + y="1220.3925" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="604.32263" + y="1242.303" + id="text5371-43-2-9-7-3-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8-7-5" + x="604.32263" + y="1242.303">400 bad request</tspan></text> + <g + transform="matrix(-0.34202014,-0.93969262,0.93969262,-0.34202014,-311.11659,1246.6148)" + id="g5650-2-0-4-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 251.64748,501.65559 c 0,0 -132.95279,-198.6035 -335.041098,15.43198" + id="path20172-9-3" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,190.22636,455.7026)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-0" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="120.08566" + y="891.92566" + id="text5371-2-8-9-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-5" + x="120.08566" + y="891.92566">true</tspan></text> + <g + transform="matrix(0,-1,-1,0,699.22962,550.33236)" + id="g5650-2-0-4-5" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-1" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-5" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1-3" + width="210.17955" + height="35.209244" + x="66.545593" + y="511.00293" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="167.39459" + y="532.79895" + id="text5371-2-74-0-7-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8-94" + x="167.39459" + y="532.79895">allow_missing_post</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-5" + width="210.17955" + height="35.209244" + x="66.545593" + y="431.80698" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="175.2144" + y="455.37643" + id="text5371-2-74-0-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-6" + x="175.2144" + y="455.37643">method is POST?</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.35022" + y="930.3703" + id="text5371-2-74-0-7-1-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8-94-5" + x="459.35022" + y="930.3703">allow_missing_post</tspan></text> + <g + transform="translate(229.41793,490.95885)" + id="g5650-0-6-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-5-7-2" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1-3-14" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-19" + width="210.17955" + height="35.209244" + x="66.545593" + y="829.06006" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="166.63885" + y="852.62952" + id="text5371-2-74-0-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-7" + x="166.63885" + y="852.62952">method is PUT?</tspan></text> + <g + transform="translate(229.41793,571.07045)" + id="g5650-2-2-65-9"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-5-1" + d="m -57.78256,343.20394 0,61.59661" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-5-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(-0.34202014,-0.93969262,-0.93969262,0.34202014,702.18987,886.11239)" + id="g5650-2-0-4-05" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2.19573760000000018;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 96.51476,423.00572 c 0,0 -72.55269,-41.6703 -192.585744,26.04761" + id="path20172-9-9" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.20642765,0.55044303,-0.55044303,0.20642765,176.90073,487.11794)" + inkscape:transform-center-y="2.5699832" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-6" + style="opacity:0.80000000000000004;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="6.2547481" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1-8" + width="210.17955" + height="35.209244" + x="66.545593" + y="908.57428" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="166.24431" + y="930.3703" + id="text5371-2-74-0-7-15" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8-2" + x="166.24431" + y="930.3703">is_conflict</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="136.52316" + y="971.55994" + id="text5371-4-4-9-3-2-08" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-2-6-0" + x="136.52316" + y="971.55994">true</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-5-9-2-7" + width="218.52127" + height="34.993004" + x="62.374733" + y="988.43671" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="171.44006" + y="1011.8981" + id="text5371-43-2-9-7-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-9-7-8-0" + x="171.44006" + y="1011.8981">409 conflict</tspan></text> + <g + transform="translate(370.63925,803.79161)" + id="g5650-93-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-3-0" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-4-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1-40" + width="210.17955" + height="35.209244" + x="207.76691" + y="1142.3002" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="313.14185" + y="1164.0962" + id="text5371-2-74-0-7-41" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-8-3" + x="313.14185" + y="1164.0962">content_types_accepted</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4-9" + width="210.17955" + height="35.209244" + x="207.76691" + y="1220.5249" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="313.21997" + y="1242.2975" + id="text5371-2-3-0-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-1" + x="313.21997" + y="1242.2975">AcceptResource</tspan></text> + <g + transform="translate(233.45629,961.91953)" + id="g5650-6-4-8-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-5-5-2" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-6-6-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-345.93614,1498.2457)" + id="g5650-2-0-4-8-9-6-0" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 169.94368,422.8286 c 0,0 -94.23585,-64.78987 -206.003937,-8.35999" + id="path20172-9-5-2-6-6" + inkscape:connector-curvature="0" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2-8-7-6" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-19-2" + width="210.17955" + height="35.209244" + x="70.583946" + y="1300.3734" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="175.50966" + y="1323.8022" + id="text5371-2-74-0-1-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-7-4" + x="175.50966" + y="1323.8022">new resource?</tspan></text> + <g + transform="translate(517.41793,962.60627)" + id="g5650-6-4-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-5-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-6-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,985.5699,1417.4167)" + id="g5650-2-0-4-8-9-6" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5-2-6" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2-8-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-19-2-1" + width="210.17955" + height="35.209244" + x="354.54559" + y="1300.3734" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.47131" + y="1323.8022" + id="text5371-2-74-0-1-3-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-7-4-8" + x="459.47131" + y="1323.8022">new resource?</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7" + width="218.52127" + height="34.993004" + x="350.37473" + y="1380.1163" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.776" + y="1403.5779" + id="text5371-43-3-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-9" + x="459.776" + y="1403.5779">201 created</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7-4" + width="218.52127" + height="34.993004" + x="350.37473" + y="1459.7511" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.03381" + y="1483.2128" + id="text5371-43-3-2-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-9-2" + x="459.03381" + y="1483.2128">303 see other</tspan></text> + <g + transform="matrix(0,1,1,0,-67.245042,1455.155)" + id="g5650-2-2-6-6-7-9-1"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6-3-8-5-9" + d="m -57.78256,339.02801 0,65.70583" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1-1-7-6-3" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(233.45629,1121.5376)" + id="g5650-6-4-8-7-7" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-5-5-2-8" + d="m -57.78256,294.4515 0,109.76214" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-6-6-6-7" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-19-2-2" + width="210.17955" + height="35.209244" + x="70.583946" + y="1379.7678" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="175.50966" + y="1401.7865" + id="text5371-2-74-0-1-3-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-7-4-9" + x="175.50966" + y="1401.7865">has resp location?</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7-4-7" + width="218.52127" + height="34.993004" + x="62.374733" + y="1619.0205" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + transform="translate(233.45629,1201.4108)" + id="g5650-6-4-8-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-5-5-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-6-6-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,1,1,0,-63.162935,1614.665)" + id="g5650-2-2-6-6-7-9"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6-3-8-5" + d="m -57.78256,339.02801 0,65.70583" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1-1-7-6" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-19-2-2-4" + width="210.17955" + height="35.209244" + x="70.583946" + y="1539.2778" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="175.50966" + y="1561.2965" + id="text5371-2-74-0-1-3-7-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-7-4-9-5" + x="175.50966" + y="1561.2965">has resp body?</tspan></text> + <g + transform="translate(517.41793,1201.395)" + id="g5650-6-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-78-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,-1,0,987.64405,1658.4266)" + id="g5650-2-0-4-8-9" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-5-2" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-2-8" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87-8" + width="210.17955" + height="35.209244" + x="354.54559" + y="1539.2778" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.30334" + y="1561.0739" + id="text5371-2-9-6" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-8-6" + x="459.30334" + y="1561.0739">multiple_choices</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="479.75421" + y="1602.6646" + id="text5371-2-8-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-7" + x="479.75421" + y="1602.6646">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-1-0" + width="218.52127" + height="34.993004" + x="350.37473" + y="1698.6555" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.42053" + y="1720.566" + id="text5371-43-5-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-62-9" + x="459.42053" + y="1720.566">300 multiple choices</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-3" + width="218.52127" + height="34.993004" + x="350.37473" + y="1619.0208" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="458.88538" + y="1642.3412" + id="text5371-43-3-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-3" + x="458.88538" + y="1642.3412">200 OK</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="171.24475" + y="1642.3412" + id="text5371-43-3-2-6-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-9-2-0" + x="171.24475" + y="1642.3412">204 no content</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="479.69171" + y="891.92566" + id="text5371-2-8-9-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-1" + x="479.69171" + y="891.92566">true</tspan></text> + <g + id="g5650-4-8" + transform="matrix(0.5,0.8660254,-0.8660254,0.5,204.7918,279.30499)"> + <path + inkscape:connector-curvature="0" + id="path5570-8-7" + d="m -58.01975,316.62647 0,86.23385" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,72.919441,161.77521)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-3-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="496.12921" + y="494.3544" + id="text5371-4-4-9-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8" + x="496.12921" + y="494.3544">true</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8-9-1-3-4-8" + width="210.17955" + height="35.209244" + x="354.54559" + y="511.00293" + rx="15" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.14709" + y="532.79895" + id="text5371-2-74-0-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-18-2-9" + x="459.14709" + y="532.79895">moved_permanently</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:2.73499846;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1-8-7-9" + width="218.52127" + height="34.993004" + x="350.37473" + y="988.43671" + rx="12.372616" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="459.67053" + y="1010.2067" + id="text5371-43-3-2-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-3-1-9-5" + x="459.67053" + y="1010.2067">410 gone</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="260.04547" + y="494.97446" + id="text5371-4-4-9-1-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-2" + x="260.04547" + y="494.97446">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="120.08566" + y="494.51349" + id="text5371-2-8-9-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-55" + x="120.08566" + y="494.51349">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="133.92941" + y="574.40112" + id="text5371-4-4-9-1-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0" + x="133.92941" + y="574.40112">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.87756" + y="828.86047" + id="text5371-4-4-9-1-1-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1" + x="315.87756" + y="828.86047">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="498.78546" + y="972.02087" + id="text5371-4-4-9-1-1-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-2" + x="498.78546" + y="972.02087">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="458.9295" + y="1217.7582" + id="text5371-4-4-9-1-1-9-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2" + x="458.9295" + y="1217.7582">false</tspan></text> + <g + transform="matrix(0,1,1,0,77.85132,1295.6715)" + id="g5650-2-2-6-6-7"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1-6-3-8" + d="m -57.78256,339.02801 0,65.70583" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-5-1-1-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="207.75119" + y="1283.5576" + id="text5371-2-391-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-4" + x="207.75119" + y="1283.5576">true</tspan></text> + <g + transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,501.47379,1045.323)" + id="g5650-9-9-1" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7-6-1" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09-5-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="419.81369" + y="1283.0615" + id="text5371-2-391-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="419.81369" + y="1283.0615" + id="tspan5794">true, URI*</tspan></text> + <g + transform="matrix(-0.70710678,0.70710678,0.70710678,0.70710678,124.04665,1045.323)" + id="g5650-9-9-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + inkscape:connector-curvature="0" + id="path5570-7-6-8" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09-5-45" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="479.69171" + y="1363.2994" + id="text5371-2-8-4-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-7-5" + x="479.69171" + y="1363.2994">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="626.74475" + y="1403.5779" + id="text5371-4-4-9-1-1-9-1-4" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2-0" + x="626.74475" + y="1403.5779">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="624.0885" + y="1642.0209" + id="text5371-4-4-9-1-1-9-1-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2-3" + x="624.0885" + y="1642.0209">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="317.91525" + y="1538.8624" + id="text5371-4-4-9-1-1-9-1-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2-1" + x="317.91525" + y="1538.8624">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="190.83659" + y="1602.2036" + id="text5371-2-8-4-3-9" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-7-5-9" + x="190.83659" + y="1602.2036">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="190.83659" + y="1363.1792" + id="text5371-2-8-4-3-8" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-7-5-0" + x="190.83659" + y="1363.1792">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="7.9966321" + y="1443.395" + id="text5371-4-4-9-1-1-9-1-4-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2-0-6" + x="7.9966321" + y="1443.395">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="317.86548" + y="1379.0562" + id="text5371-4-4-9-1-1-9-1-2-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-0-1-2-1-5" + x="317.86548" + y="1379.0562">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="190.83659" + y="1482.6313" + id="text5371-2-8-4-3-8-7" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-7-5-0-8" + x="190.83659" + y="1482.6313">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="85.095001" + y="891.92566" + id="text5371-4-4-9-1-4-2" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-2-6-8-2-9" + x="85.095001" + y="891.92566">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="232.21094" + y="971.55994" + id="text5371-2-391-5-5-1-0-7-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-63-7-9-9-2-8-8" + x="232.21094" + y="971.55994">false</tspan></text> + <g + transform="matrix(0,-1,1,0,-359.02432,626.75367)" + id="g5650-2-0-4-3-8-9-4" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <g + id="g6614"> + <g + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + id="g5650-2-0-4-3-8-9" + transform="matrix(0,-1,-1,0,347.00351,567.35686)"> + <path + inkscape:transform-center-x="-3.1059024" + sodipodi:type="star" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="path5576-12-1-7-58-6-1-4" + sodipodi:sides="3" + sodipodi:cx="-222.73865" + sodipodi:cy="415.25897" + sodipodi:r1="14.849242" + sodipodi:r2="7.4246211" + sodipodi:arg1="1.5707963" + sodipodi:arg2="2.6179939" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:transform-center-y="6.2755376" + transform="matrix(0.10770811,0.57792634,-0.57792634,0.10770811,224.52461,390.64831)" /> + </g> + <path + transform="translate(0,-1.5472441e-4)" + inkscape:connector-curvature="0" + id="path6438" + d="M 72.831997,543.06854 C 17.500892,616.78442 35.178561,698.8088 35.178561,698.8088" + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="536.26642" + y="972.02087" + id="text5371-2-8-9-1-5" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-1-4" + x="536.26642" + y="972.02087">true</tspan></text> + <g + transform="matrix(0,-1,-1,0,347.71062,566.6496)" + id="g5650-2-0-4-3-8-9-2-8" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"> + <path + style="fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 146.3711,152.21525 c 0,0 -65.760927,60.81119 -8.48528,132.93608" + id="path20172-9-8-9-3-7-4" + inkscape:connector-curvature="0" + transform="matrix(0,1,-1,0,248.85545,276.69312)" /> + <path + transform="matrix(0.38224114,0.44664484,-0.44664484,0.38224114,233.48523,355.54168)" + inkscape:transform-center-y="-1.0388082" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1-7-58-6-1-5-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" + inkscape:transform-center-x="4.5299474" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="322.92551" + y="375.54388" + id="text5371-4-6-1" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-9-0-8" + x="322.92551" + y="375.54388">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="66.001251" + y="574.40112" + id="text5371-2-8-9-0-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/ninenines/cowboy/guide/rest_options.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-3-4-55-3" + x="66.001251" + y="574.40112">true</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_start.png b/_build/static/docs/en/cowboy/1.0/guide/rest_start.png Binary files differnew file mode 100644 index 00000000..7f264642 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_start.png diff --git a/_build/static/docs/en/cowboy/1.0/guide/rest_start.svg b/_build/static/docs/en/cowboy/1.0/guide/rest_start.svg new file mode 100644 index 00000000..d75e1cc6 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/rest_start.svg @@ -0,0 +1,1468 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rest_options.svg" + inkscape:export-filename="/home/essen/Dropbox/Public/drawing.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient5265"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5267" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.58823532;" + offset="1" + id="stop5269" /> + </linearGradient> + <linearGradient + id="linearGradient5251"> + <stop + style="stop-color:#69d2e7;stop-opacity:0.78431374;" + offset="0" + id="stop5253" /> + <stop + id="stop5263" + offset="0.5" + style="stop-color:#69d2e7;stop-opacity:1;" /> + <stop + style="stop-color:#69d2e7;stop-opacity:0.39215687;" + offset="1" + id="stop5255" /> + </linearGradient> + <linearGradient + id="linearGradient5233" + osb:paint="solid"> + <stop + style="stop-color:#69d2e7;stop-opacity:1;" + offset="0" + id="stop5235" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:zoom="1.0000001" + inkscape:cx="171.11305" + inkscape:cy="549.52821" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="2560" + inkscape:window-height="1402" + inkscape:window-x="0" + inkscape:window-y="38" + inkscape:window-maximized="1" + inkscape:snap-global="true" + showguides="true"> + <inkscape:grid + type="xygrid" + id="grid5357" + empspacing="5" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" /> + </sodipodi:namedview> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + inkscape:export-ydpi="89.926643" + inkscape:export-xdpi="89.926643" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:connector-curvature="0" + id="use5777" + d="m -360.31658,371.70113 203.00246,0.045" + style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1.99999999, 3.99999998;stroke-dashoffset:0" /> + <g + transform="translate(205.92143,-296.03137)" + id="g5650-7"> + <path + inkscape:connector-curvature="0" + id="path5570-9" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-0" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,-212.00698)" + id="g5650-9"> + <path + inkscape:connector-curvature="0" + id="path5570-7" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-09" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,-129.04326)" + id="g5650-0"> + <path + inkscape:connector-curvature="0" + id="path5570-5" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-1" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,-44.866334)" + id="g5650-94"> + <path + inkscape:connector-curvature="0" + id="path5570-71" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-5" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,38.329623)" + id="g5650-93"> + <path + inkscape:connector-curvature="0" + id="path5570-3" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-4" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,122.59665)" + id="g5650-3"> + <path + inkscape:connector-curvature="0" + id="path5570-93" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-04" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,206.62103)" + id="g5650-6"> + <path + inkscape:connector-curvature="0" + id="path5570-78" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-9" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,289.59516)" + id="g5650-34"> + <path + inkscape:connector-curvature="0" + id="path5570-30" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-3" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,373.37691)" + id="g5650-5"> + <path + inkscape:connector-curvature="0" + id="path5570-90" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-6" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,457.4117)" + id="g5650-1"> + <path + inkscape:connector-curvature="0" + id="path5570-33" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-2" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="translate(205.92143,541.19345)" + id="g5650-10"> + <path + inkscape:connector-curvature="0" + id="path5570-8" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-8" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,80.832304)" + id="g5650-2-0"> + <path + inkscape:connector-curvature="0" + id="path5570-2-5" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-1" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,164.49956)" + id="g5650-2-6"> + <path + inkscape:connector-curvature="0" + id="path5570-2-1" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-6" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,248.1668)" + id="g5650-2-4"> + <path + inkscape:connector-curvature="0" + id="path5570-2-0" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-7" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,331.8341)" + id="g5650-2-04"> + <path + inkscape:connector-curvature="0" + id="path5570-2-9" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-0" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,415.50138)" + id="g5650-2-8"> + <path + inkscape:connector-curvature="0" + id="path5570-2-50" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-2" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,499.16862)" + id="g5650-2-1"> + <path + inkscape:connector-curvature="0" + id="path5570-2-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-9" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,582.83589)" + id="g5650-2-3"> + <path + inkscape:connector-curvature="0" + id="path5570-2-10" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-60" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,666.50315)" + id="g5650-2-44"> + <path + inkscape:connector-curvature="0" + id="path5570-2-11" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-73" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,750.17041)" + id="g5650-2-12"> + <path + inkscape:connector-curvature="0" + id="path5570-2-6" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-04" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <g + transform="matrix(0,-1,1,0,-25.673146,833.83768)" + id="g5650-2-34"> + <path + inkscape:connector-curvature="0" + id="path5570-2-62" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12-62" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-28" + width="210.17955" + height="35.209244" + x="43.049091" + y="204.67757" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-5" + width="210.17955" + height="35.209244" + x="43.049091" + y="288.40311" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-8" + width="210.17955" + height="35.209244" + x="43.049091" + y="372.01199" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-4" + width="210.17955" + height="35.209244" + x="43.049091" + y="455.67929" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-87" + width="210.17955" + height="35.209244" + x="43.049091" + y="539.34656" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-41" + width="210.17955" + height="35.209244" + x="43.049091" + y="623.01385" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-7" + width="210.17955" + height="35.209244" + x="43.049091" + y="706.68115" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-20" + width="210.17955" + height="35.209244" + x="43.049091" + y="790.34839" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-3" + width="210.17955" + height="35.209244" + x="43.049091" + y="874.01562" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-54" + width="210.17955" + height="35.209244" + x="43.049091" + y="957.68292" + rx="15" /> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1" + width="210.17955" + height="35.209244" + x="43.049091" + y="121.0042" + rx="15" /> + <g + id="g5650" + transform="translate(0,-0.47597102)"> + <path + inkscape:connector-curvature="0" + id="path5570" + d="m -57.78256,351.41962 0,52.3259" + style="opacity:0.8;fill:none;stroke:#6d8e41;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576" + style="opacity:0.8;fill:#6d8e41;fill-opacity:1;fill-rule:nonzero;stroke:#6d8e41;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273" + width="104.5895" + height="36.392323" + x="-224.02068" + y="29.41218" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7" + width="104.5895" + height="36.392323" + x="-224.02068" + y="90.691978" + rx="15" /> + <rect + style="fill:#ffc48c;fill-opacity:1;fill-rule:nonzero;stroke:#d79c64;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-2" + width="104.5895" + height="36.392323" + x="-224.02068" + y="151.97169" + rx="15" /> + <rect + style="fill:#ff9f80;fill-opacity:1;fill-rule:nonzero;stroke:#d77758;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-22" + width="104.5895" + height="36.392323" + x="-224.02068" + y="213.25146" + rx="15" /> + <rect + style="fill:#f56991;fill-opacity:1;fill-rule:nonzero;stroke:#cd4169;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-8" + width="104.5895" + height="36.392323" + x="-224.02068" + y="274.53128" + rx="15" /> + <use + x="0" + y="0" + xlink:href="#rect5273-22" + id="use5355" + transform="translate(319.86479,-176.50006)" + width="744.09448" + height="1052.3622" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="114.39204" + id="text5371" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373" + x="-58.692513" + y="114.39204">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="53.112247" + id="text5371-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6" + x="-58.692513" + y="53.112247">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.18575" + y="310.19913" + id="text5371-2-3" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7" + x="148.18575" + y="310.19913">uri_too_long</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.60762" + y="477.47531" + id="text5371-2-3-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3" + x="147.60762" + y="477.47531">malformed_request</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-58.692513" + y="236.95154" + id="text5371-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9" + x="-58.692513" + y="236.95154">some text</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.00391" + y="60.912468" + id="text5371-4-0" + sodipodi:linespacing="125%" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + x="147.00391" + y="60.912468" + id="tspan17171">init</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.11153" + y="561.14258" + id="text5371-2-9" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-8" + x="148.11153" + y="561.14258">is_authorized</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.64278" + y="646.58331" + id="text5371-2-7" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-2" + x="148.64278" + y="646.58331">forbidden</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.29512" + y="728.47717" + id="text5371-2-73" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-5" + x="148.29512" + y="728.47717">valid_content_headers</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.83809" + y="812.14441" + id="text5371-2-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-1" + x="147.83809" + y="812.14441">known_content_type</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.58809" + y="895.81165" + id="text5371-2-1" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-71" + x="148.58809" + y="895.81165">valid_entity_length</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.092" + y="979.7016" + id="text5371-2-39" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-6" + x="148.092" + y="979.7016">...</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.13106" + y="142.80627" + id="text5371-2-95" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-80" + x="148.13106" + y="142.80627">service_available</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="147.80684" + y="226.4736" + id="text5371-2-32" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-27" + x="147.80684" + y="226.4736">known_methods</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="148.05293" + y="393.80801" + id="text5371-2-74" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-18" + x="148.05293" + y="393.80801">allowed_methods</tspan></text> + <rect + style="fill:#d1f2a5;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-1-2" + width="210.17955" + height="35.209244" + x="-489.75586" + y="33.4944" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="185.95248" + id="text5371-2-391" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-63" + x="164.26562" + y="185.95248">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="269.61978" + id="text5371-2-954" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-808" + x="164.26562" + y="269.61978">known*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="353.28702" + id="text5371-2-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-11" + x="164.26562" + y="353.28702">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="436.95425" + id="text5371-2-92" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-4" + x="164.26562" + y="436.95425">allowed*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="520.62152" + id="text5371-2-739" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-0" + x="164.26562" + y="520.62152">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="604.28876" + id="text5371-2-8" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-3" + x="164.26562" + y="604.28876">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="687.95599" + id="text5371-2-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-01" + x="164.26562" + y="687.95599">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="771.62329" + id="text5371-2-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-33" + x="164.26562" + y="771.62329">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="855.29053" + id="text5371-2-21" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-9" + x="164.26562" + y="855.29053">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="164.26562" + y="938.95776" + id="text5371-2-22" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-6-57" + x="164.26562" + y="938.95776">true</tspan></text> + <g + transform="matrix(0,-1,1,0,-513.31414,353.05561)" + id="g5650-2"> + <path + inkscape:connector-curvature="0" + id="path5570-2" + d="m -57.78256,275.13761 0,129.13992" + style="opacity:0.8;fill:none;stroke:#9b3b1c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" + inkscape:transform-center-y="2.1823437" + d="m -222.73865,430.10821 -12.85982,-22.27386 25.71964,0 z" + inkscape:randomized="0" + inkscape:rounded="0" + inkscape:flatsided="true" + sodipodi:arg2="2.6179939" + sodipodi:arg1="1.5707963" + sodipodi:r2="7.4246211" + sodipodi:r1="14.849242" + sodipodi:cy="415.25897" + sodipodi:cx="-222.73865" + sodipodi:sides="3" + id="path5576-12" + style="opacity:0.8;fill:#9b3b1c;fill-opacity:1;fill-rule:nonzero;stroke:#9b3b1c;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + sodipodi:type="star" /> + </g> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="123.86062" + id="text5371-4-6" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-0" + x="315.26172" + y="123.86062">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="207.30568" + id="text5371-4-7" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-6" + x="315.26172" + y="207.30568">unknown*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="290.75076" + id="text5371-4-2" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-01" + x="315.26172" + y="290.75076">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="374.19577" + id="text5371-4-3" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-62" + x="315.26172" + y="374.19577">unallowed*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="457.64084" + id="text5371-4-4" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-2" + x="315.26172" + y="457.64084">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="541.08588" + id="text5371-4-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-09" + x="315.26172" + y="541.08588">false*</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="624.53094" + id="text5371-4-61" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-69" + x="315.26172" + y="624.53094">true</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="707.97595" + id="text5371-4-58" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-5" + x="315.26172" + y="707.97595">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="791.42102" + id="text5371-4-54" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-012" + x="315.26172" + y="791.42102">false</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#9b3b1c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="315.26172" + y="874.86609" + id="text5371-4-38" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-9-67" + x="315.26172" + y="874.86609">false</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3" + width="264.92532" + height="34.728001" + x="392.03732" + y="121.24477" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.53516" + y="143.02283" + id="text5371-6" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + x="524.53516" + y="143.02283" + id="tspan18994">503 service unavailable</tspan></text> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-9" + width="264.92532" + height="34.728001" + x="392.03732" + y="204.93674" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-6" + width="264.92532" + height="34.728001" + x="392.03732" + y="288.62869" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-1" + width="264.92532" + height="34.728001" + x="392.03732" + y="372.32065" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-90" + width="264.92532" + height="34.728001" + x="392.03732" + y="456.01254" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-2" + width="264.92532" + height="34.728001" + x="392.03732" + y="539.70447" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-3" + width="264.92532" + height="34.728001" + x="392.03732" + y="623.39642" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-39" + width="264.92532" + height="34.728001" + x="392.03732" + y="707.08838" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-5" + width="264.92532" + height="34.728001" + x="392.03732" + y="790.78027" + rx="15" /> + <rect + style="fill:#effab4;fill-opacity:1;fill-rule:nonzero;stroke:#c7d28c;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5273-7-3-29" + width="264.92532" + height="34.728001" + x="392.03732" + y="874.47223" + rx="15" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="227.80464" + id="text5371-7" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-69" + x="524.26172" + y="227.80464">501 not implemented</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="311.49661" + id="text5371-9" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-5" + x="524.26172" + y="311.49661">414 request URI too long</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="395.18857" + id="text5371-43" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-3" + x="524.26172" + y="395.18857">405 method not allowed</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="478.88046" + id="text5371-3" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-67" + x="524.26172" + y="478.88046">400 bad request</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="562.57239" + id="text5371-1" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-53" + x="524.26172" + y="562.57239">401 unauthorized</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="646.26434" + id="text5371-27" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-64" + x="524.26172" + y="646.26434">403 forbidden</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="729.9563" + id="text5371-21" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-58" + x="524.26172" + y="729.9563">501 not implemented</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="813.64819" + id="text5371-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-60" + x="524.26172" + y="813.64819">415 unsupported media type</tspan></text> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#77823c;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="524.26172" + y="897.34015" + id="text5371-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5373-0" + x="524.26172" + y="897.34015">413 request entity too large</tspan></text> + <rect + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#a9ca7d;stroke-width:2.44279909;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" + id="rect5367" + width="207.05719" + height="171.55719" + x="-373.52859" + y="458.58362" + rx="11.072577" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643" /> + <text + xml:space="preserve" + style="font-size:16px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#6d8e41;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" + x="-544.69421" + y="-354.17184" + id="text5371-2-3-0-7" + sodipodi:linespacing="125%" + transform="matrix(0,-1,1,0,0,0)" + inkscape:export-filename="/home/essen/extend/cowboy/guide/http_req_resp.png" + inkscape:export-xdpi="89.926643" + inkscape:export-ydpi="89.926643"><tspan + sodipodi:role="line" + id="tspan5373-6-7-3-9" + x="-544.69421" + y="-354.17184">middlewares</tspan></text> + </g> +</svg> diff --git a/_build/static/docs/en/cowboy/1.0/guide/routing/index.html b/_build/static/docs/en/cowboy/1.0/guide/routing/index.html new file mode 100644 index 00000000..9f0923f0 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/routing/index.html @@ -0,0 +1,365 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Routing</span></h1> + +<p>Cowboy does nothing by default.</p> + +<p>To make Cowboy useful, you need to map URLs to Erlang modules that will handle the requests. This is called routing.</p> + +<p>When Cowboy receives a request, it tries to match the requested host and path to the resources given in the dispatch rules. If it matches, then the associated Erlang code will be executed.</p> + +<p>Routing rules are given per host. Cowboy will first match on the host, and then try to find a matching path.</p> + +<p>Routes need to be compiled before they can be used by Cowboy.</p> + +<h2 id="structure">Structure</h2> + +<p>The general structure for the routes is defined as follow.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Routes = [Host1, Host2, ... HostN]. +]]></script> + +<p>Each host contains matching rules for the host along with optional constraints, and a list of routes for the path component.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Host1 = {HostMatch, PathsList}. +Host2 = {HostMatch, Constraints, PathsList}. +]]></script> + +<p>The list of routes for the path component is defined similar to the list of hosts.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathsList = [Path1, Path2, ... PathN]. +]]></script> + +<p>Finally, each path contains matching rules for the path along with optional constraints, and gives us the handler module to be used along with options that will be given to it on initialization.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Path1 = {PathMatch, Handler, Opts}. +Path2 = {PathMatch, Constraints, Handler, Opts}. +]]></script> + +<p>Continue reading to learn more about the match syntax and the optional constraints.</p> + +<h2 id="match_syntax">Match syntax</h2> + +<p>The match syntax is used to associate host names and paths with their respective handlers.</p> + +<p>The match syntax is the same for host and path with a few subtleties. Indeed, the segments separator is different, and the host is matched starting from the last segment going to the first. All examples will feature both host and path match rules and explain the differences when encountered.</p> + +<p>Excluding special values that we will explain at the end of this section, the simplest match value is a host or a path. It can be given as either a <code>string()</code> or a <code>binary()</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch1 = "/". +PathMatch2 = "/path/to/resource". + +HostMatch1 = "cowboy.example.org". +]]></script> + +<p>As you can see, all paths defined this way must start with a slash character. Note that these two paths are identical as far as routing is concerned.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch2 = "/path/to/resource". +PathMatch3 = "/path/to/resource/". +]]></script> + +<p>Hosts with and without a trailing dot are equivalent for routing. Similarly, hosts with and without a leading dot are also equivalent.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +HostMatch1 = "cowboy.example.org". +HostMatch2 = "cowboy.example.org.". +HostMatch3 = ".cowboy.example.org". +]]></script> + +<p>It is possible to extract segments of the host and path and to store the values in the <code>Req</code> object for later use. We call these kind of values bindings.</p> + +<p>The syntax for bindings is very simple. A segment that begins with the <code>:</code> character means that what follows until the end of the segment is the name of the binding in which the segment value will be stored.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/:name/prices". +HostMatch = ":subdomain.example.org". +]]></script> + +<p>If these two end up matching when routing, you will end up with two bindings defined, <code>subdomain</code> and <code>name</code>, each containing the segment value where they were defined. For example, the URL <code>http://test.example.org/hats/wild_cowboy_legendary/prices</code> will result in having the value <code>test</code> bound to the name <code>subdomain</code> and the value <code>wild_cowboy_legendary</code> bound to the name <code>name</code>. They can later be retrieved using <code>cowboy_req:binding/{2,3}</code>. The binding name must be given as an atom.</p> + +<p>There is a special binding name you can use to mimic the underscore variable in Erlang. Any match against the <code>_</code> binding will succeed but the data will be discarded. This is especially useful for matching against many domain names in one go.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +HostMatch = "ninenines.:_". +]]></script> + +<p>Similarly, it is possible to have optional segments. Anything between brackets is optional.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/[page/:number]". +HostMatch = "[www.]ninenines.eu". +]]></script> + +<p>You can also have imbricated optional segments.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/[page/[:number]]". +]]></script> + +<p>You can retrieve the rest of the host or path using <code>[...]</code>. In the case of hosts it will match anything before, in the case of paths anything after the previously matched segments. It is a special case of optional segments, in that it can have zero, one or many segments. You can then find the segments using <code>cowboy_req:host_info/1</code> and <code>cowboy_req:path_info/1</code> respectively. They will be represented as a list of segments.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/[...]". +HostMatch = "[...]ninenines.eu". +]]></script> + +<p>If a binding appears twice in the routing rules, then the match will succeed only if they share the same value. This copies the Erlang pattern matching behavior.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/:name/:name". +]]></script> + +<p>This is also true when an optional segment is present. In this case the two values must be identical only if the segment is available.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/hats/:name/[:name]". +]]></script> + +<p>If a binding is defined in both the host and path, then they must also share the same value.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = "/:user/[...]". +HostMatch = ":user.github.com". +]]></script> + +<p>Finally, there are two special match values that can be used. The first is the atom <code>'_'</code> which will match any host or path.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +PathMatch = '_'. +HostMatch = '_'. +]]></script> + +<p>The second is the special host match <code>"*"</code> which will match the wildcard path, generally used alongside the <code>OPTIONS</code> method.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +HostMatch = "*". +]]></script> + +<h2 id="constraints">Constraints</h2> + +<p>After the matching has completed, the resulting bindings can be tested against a set of constraints. Constraints are only tested when the binding is defined. They run in the order you defined them. The match will succeed only if they all succeed.</p> + +<p>They are always given as a two or three elements tuple, where the first element is the name of the binding, the second element is the constraint's name, and the optional third element is the constraint's arguments.</p> + +<p>The following constraints are currently defined:</p> + +<ul> +<li>{Name, int}</li> +<li>{Name, function, fun ((Value) -> true | {true, NewValue} | false)}</li> +</ul> + +<p>The <code>int</code> constraint will check if the binding is a binary string representing an integer, and if it is, will convert the value to integer.</p> + +<p>The <code>function</code> constraint will pass the binding value to a user specified function that receives the binary value as its only argument and must return whether it fulfills the constraint, optionally modifying the value. The value thus returned can be of any type.</p> + +<p>Note that constraint functions SHOULD be pure and MUST NOT crash.</p> + +<h2 id="compilation">Compilation</h2> + +<p>The structure defined in this chapter needs to be compiled before it is passed to Cowboy. This allows Cowboy to efficiently lookup the correct handler to run instead of having to parse the routes repeatedly.</p> + +<p>This can be done with a simple call to <code>cowboy_router:compile/1</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +Dispatch = cowboy_router:compile([ + %% {HostMatch, list({PathMatch, Handler, Opts})} + {'_', [{'_', my_handler, []}]} +]), +%% Name, NbAcceptors, TransOpts, ProtoOpts +cowboy:start_http(my_http_listener, 100, + [{port, 8080}], + [{env, [{dispatch, Dispatch}]}] +). +]]></script> + +<p>Note that this function will return <code>{error, badarg}</code> if the structure given is incorrect.</p> + +<h2 id="live_update">Live update</h2> + +<p>You can use the <code>cowboy:set_env/3</code> function for updating the dispatch list used by routing. This will apply to all new connections accepted by the listener.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +cowboy:set_env(my_http_listener, dispatch, + cowboy_router:compile(Dispatch)). +]]></script> + +<p>Note that you need to compile the routes before updating.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/static_handlers/index.html b/_build/static/docs/en/cowboy/1.0/guide/static_handlers/index.html new file mode 100644 index 00000000..98e9c833 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/static_handlers/index.html @@ -0,0 +1,280 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Static handler</span></h1> + +<p>The static handler is a built-in REST handler for serving files. It is available as a convenience and provides a quick solution for serving files during development.</p> + +<p>For systems in production, consider using one of the many Content Distribution Network (CDN) available on the market, as they are the best solution for serving files. They are covered in the next chapter. If you decide against using a CDN solution, then please look at the chapter after that, as it explains how to efficiently serve static files on your own.</p> + +<p>The static handler can serve either one file or all files from a given directory. It can also send etag headers for client-side caching.</p> + +<p>To use the static file handler, simply add routes for it with the appropriate options.</p> + +<h2 id="serve_one_file">Serve one file</h2> + +<p>You can use the static handler to serve one specific file from an application's private directory. This is particularly useful to serve an <code>index.html</code> file when the client requests the <code>/</code> path, for example. The path configured is relative to the given application's private directory.</p> + +<p>The following rule will serve the file <code>static/index.html</code> from the application <code>my_app</code>'s priv directory whenever the path <code>/</code> is accessed.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/", cowboy_static, {priv_file, my_app, "static/index.html"}} +]]></script> + +<p>You can also specify the absolute path to a file, or the path to the file relative to the current directory.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/", cowboy_static, {file, "/var/www/index.html"}} +]]></script> + +<h2 id="serve_all_files_from_a_directory">Serve all files from a directory</h2> + +<p>You can also use the static handler to serve all files that can be found in the configured directory. The handler will use the <code>path_info</code> information to resolve the file location, which means that your route must end with a <code>[...]</code> pattern for it to work. All files are served, including the ones that may be found in subfolders.</p> + +<p>You can specify the directory relative to an application's private directory.</p> + +<p>The following rule will serve any file found in the application <code>my_app</code>'s priv directory inside the <code>static/assets</code> folder whenever the requested path begins with <code>/assets/</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets"}} +]]></script> + +<p>You can also specify the absolute path to the directory or set it relative to the current directory.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {dir, "/var/www/assets"}} +]]></script> + +<h2 id="customize_the_mimetype_detection">Customize the mimetype detection</h2> + +<p>By default, Cowboy will attempt to recognize the mimetype of your static files by looking at the extension.</p> + +<p>You can override the function that figures out the mimetype of the static files. It can be useful when Cowboy is missing a mimetype you need to handle, or when you want to reduce the list to make lookups faster. You can also give a hard-coded mimetype that will be used unconditionally.</p> + +<p>Cowboy comes with two functions built-in. The default function only handles common file types used when building Web applications. The other function is an extensive list of hundreds of mimetypes that should cover almost any need you may have. You can of course create your own function.</p> + +<p>To use the default function, you should not have to configure anything, as it is the default. If you insist, though, the following will do the job.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets", + [{mimetypes, cow_mimetypes, web}]}} +]]></script> + +<p>As you can see, there is an optional field that may contain a list of less used options, like mimetypes or etag. All option types have this optional field.</p> + +<p>To use the function that will detect almost any mimetype, the following configuration will do.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets", + [{mimetypes, cow_mimetypes, all}]}} +]]></script> + +<p>You probably noticed the pattern by now. The configuration expects a module and a function name, so you can use any of your own functions instead.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets", + [{mimetypes, Module, Function}]}} +]]></script> + +<p>The function that performs the mimetype detection receives a single argument that is the path to the file on disk. It is recommended to return the mimetype in tuple form, although a binary string is also allowed (but will require extra processing). If the function can't figure out the mimetype, then it should return <code>{<<"application">>, <<"octet-stream">>, []}</code>.</p> + +<p>When the static handler fails to find the extension in the list, it will send the file as <code>application/octet-stream</code>. A browser receiving such file will attempt to download it directly to disk.</p> + +<p>Finally, the mimetype can be hard-coded for all files. This is especially useful in combination with the <code>file</code> and <code>priv_file</code> options as it avoids needless computation.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/", cowboy_static, {priv_file, my_app, "static/index.html", + [{mimetypes, {<<"text">>, <<"html">>, []}}]}} +]]></script> + +<h2 id="generate_an_etag">Generate an etag</h2> + +<p>By default, the static handler will generate an etag header value based on the size and modified time. This solution can not be applied to all systems though. It would perform rather poorly over a cluster of nodes, for example, as the file metadata will vary from server to server, giving a different etag on each server.</p> + +<p>You can however change the way the etag is calculated.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets", + [{etag, Module, Function}]}} +]]></script> + +<p>This function will receive three arguments: the path to the file on disk, the size of the file and the last modification time. In a distributed setup, you would typically use the file path to retrieve an etag value that is identical across all your servers.</p> + +<p>You can also completely disable etag handling.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets", + [{etag, false}]}} +]]></script> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/upgrade_protocol/index.html b/_build/static/docs/en/cowboy/1.0/guide/upgrade_protocol/index.html new file mode 100644 index 00000000..41aa090e --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/upgrade_protocol/index.html @@ -0,0 +1,200 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Protocol upgrades</span></h1> + +<p>Cowboy features many different handlers, each for different purposes. All handlers have a common entry point: the <code>init/3</code> function.</p> + +<p>The default handler type is the simple HTTP handler.</p> + +<p>To switch to a different protocol, you must perform a protocol upgrade. This is what is done for Websocket and REST and is explained in details in the respective chapters.</p> + +<p>You can also create your own protocol on top of Cowboy and use the protocol upgrade mechanism to switch to it.</p> + +<p>For example, if you create the <code>my_protocol</code> module implementing the <code>cowboy_sub_protocol</code> behavior, then you can upgrade to it by simply returning the module name from <code>init/3</code>.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_, _, _Opts) -> + {upgrade, protocol, my_protocol}. +]]></script> + +<p>The <code>cowboy_sub_protocol</code> behavior only requires one callback, <code>upgrade/4</code>. It receives the Req object, the middleware environment, and the handler and options for this request. This is the same module as the <code>init/3</code> function and the same options that were passed to it.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +upgrade(Req, Env, Handler, HandlerOpts) -> + %% ... +]]></script> + +<p>This callback is expected to behave like a middleware. Please see the corresponding chapter for more information.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/ws_handlers/index.html b/_build/static/docs/en/cowboy/1.0/guide/ws_handlers/index.html new file mode 100644 index 00000000..e1d3d9a2 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/ws_handlers/index.html @@ -0,0 +1,327 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Handling Websocket connections</span></h1> + +<p>A special handler is required for handling Websocket connections. Websocket handlers allow you to initialize the connection, handle incoming frames from the socket, handle incoming Erlang messages and then clean up on termination.</p> + +<p>Websocket handlers essentially act as a bridge between the client and the Erlang system. They will typically do little more than socket communication and decoding/encoding of frames.</p> + +<h2 id="initialization">Initialization</h2> + +<p>First, the <code>init/3</code> callback is called. This callback is common to all handlers. To establish a Websocket connection, this function must return an <code>upgrade</code> tuple.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_, Req, Opts) -> + {upgrade, protocol, cowboy_websocket}. +]]></script> + +<p>It is also possible to return an update Req object and options using the longer form of this tuple.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +init(_Type, Req, Opts) -> + {upgrade, protocol, cowboy_websocket, Req, Opts}. +]]></script> + +<p>Upon receiving this tuple, Cowboy will switch to the code that handles Websocket connections. It does not immediately perform the handshake however. First, it calls the <code>websocket_init/3</code> callback.</p> + +<p>This function must be used to initialize the state, and can also be used to register the process, start a timer, etc. As long as the function returns an <code>ok</code> tuple, then Cowboy performs the Websocket handshake.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_init(_Type, Req, _Opts) -> + {ok, Req, #state{}}. +]]></script> + +<p>A <code>shutdown</code> tuple can be returned to refuse to perform the handshake. When doing so, Cowboy will send a <code>400 Bad Request</code> response to the client and close the connection.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_init(_Type, Req, _Opts) -> + {shutdown, Req}. +]]></script> + +<p>It is also possible to perform a <code>cowboy_req:reply/{2,3,4}</code> before returning a <code>shutdown</code> tuple, allowing you to override the response sent back to the client.</p> + +<p>Note that browser support for handling Websocket connection failures may vary.</p> + +<p>If the sec-websocket-protocol header was sent with the request for establishing a Websocket connection, then the Websocket handler <em>must</em> select one of these subprotocol and send it back to the client, otherwise the client might decide to close the connection, assuming no correct subprotocol was found.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_init(_Type, Req, _Opts) -> + case cowboy_req:parse_header(<<"sec-websocket-protocol">>, Req) of + {ok, undefined, Req2} -> + {ok, Req, #state{}}; + {ok, Subprotocols, Req2} -> + case lists:keymember(<<"mychat2">>, 1, Subprotocols) of + true -> + Req3 = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>, + <<"mychat2">>, Req2), + {ok, Req3, #state{}}; + false -> + {shutdown, Req2} + end + end. +]]></script> + +<p>It is not recommended to wait too long inside the <code>websocket_init/3</code> function. Any extra initialization may be done after returning by sending yourself a message before doing anything. Any message sent to <code>self()</code> from <code>websocket_init/3</code> is guaranteed to arrive before any frames from the client.</p> + +<p>It is also very easy to ensure that this message arrives before any message from other processes by sending it before registering or enabling timers.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_init(_Type, Req, _Opts) -> + self() ! post_init, + %% Register process here... + {ok, Req, #state{}}. + +websocket_info(post_init, Req, State) -> + %% Perform post_init initialization here... + {ok, Req, State}. +]]></script> + +<h2 id="handling_frames_from_the_client">Handling frames from the client</h2> + +<p>Cowboy will call <code>websocket_handle/3</code> whenever a text, binary, ping or pong frame arrives from the client. Note that in the case of ping and pong frames, no action is expected as Cowboy automatically replies to ping frames.</p> + +<p>The handler can decide to send frames to the socket, shutdown or just continue without sending anything.</p> + +<p>The following snippet echoes back any text frame received and ignores all others.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_handle(Frame = {text, _}, Req, State) -> + {reply, Frame, Req, State}; +websocket_handle(_Frame, Req, State) -> + {ok, Req, State}. +]]></script> + +<h2 id="handling_erlang_messages">Handling Erlang messages</h2> + +<p>Cowboy will call <code>websocket_info/3</code> whenever an Erlang message arrives.</p> + +<p>The handler can decide to send frames to the socket, shutdown or just continue without sending anything.</p> + +<p>The following snippet forwards any <code>log</code> message to the socket and ignores all others.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_info({log, Text}, Req, State) -> + {reply, {text, Text}, Req, State}; +websocket_info(_Info, Req, State) -> + {ok, Req, State}. +]]></script> + +<h2 id="sending_frames_to_the_socket">Sending frames to the socket</h2> + +<p>Cowboy allows sending either a single frame or a list of frames to the socket. Any frame can be sent: text, binary, ping, pong or close frames.</p> + +<p>The following example sends three frames using a single <code>reply</code> tuple.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_info(hello_world, Req, State) -> + {reply, [ + {text, "Hello"}, + {text, <<"world!">>}, + {binary, <<0:8000>>} + ], Req, State}; +%% More websocket_info/3 clauses here... +]]></script> + +<p>Note that the payload for text and binary frames is of type <code>iodata()</code>, meaning it can be either a <code>binary()</code> or an <code>iolist()</code>.</p> + +<p>Sending a <code>close</code> frame will immediately initiate the closing of the Websocket connection. Be aware that any additional frames sent by the client or any Erlang messages waiting to be received will not be processed. Also note that when replying a list of frames that includes close, any frame found after the close frame will not be sent.</p> + +<h2 id="ping_and_timeout">Ping and timeout</h2> + +<p>The biggest performance improvement you can do when dealing with a huge number of Websocket connections is to reduce the number of timers that are started on the server. A common use of timers when dealing with connections is for sending a ping every once in a while. This should be done exclusively on the client side. Indeed, a server handling one million Websocket connections will perform a lot better when it doesn't have to handle one million extra timers too!</p> + +<p>Cowboy will automatically respond to ping frames sent by the client. It will still forward the frame to the handler for informative purpose, but no further action is required.</p> + +<p>Cowboy can be configured to automatically close the Websocket connection when no data arrives on the socket. It is highly recommended to configure a timeout for it, as otherwise you may end up with zombie "half-connected" sockets that may leave the process alive forever.</p> + +<p>A good timeout value is 60 seconds.</p> + +<script type="syntaxhighlighter" class="brush: erlang"><![CDATA[ +websocket_init(_Type, Req, _Opts) -> + {ok, Req, #state{}, 60000}. +]]></script> + +<p>This value cannot be changed once it is set. It defaults to <code>infinity</code>.</p> + +<h2 id="hibernate">Hibernate</h2> + +<p>Most tuples returned from handler callbacks can include an extra value <code>hibernate</code>. After doing any necessary operations following the return of the callback, Cowboy will hibernate the process.</p> + +<p>It is highly recommended to hibernate processes that do not handle much traffic. It is a good idea to hibernate all connections by default and investigate only when you start noticing increased CPU usage.</p> + +<h2 id="supporting_older_browsers">Supporting older browsers</h2> + +<p>Unfortunately Websocket is a relatively recent technology, which means that not all browsers support it. A library like <a href="https://github.com/extend/bullet">Bullet</a> can be used to emulate Websocket connections on older browsers.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/guide/ws_protocol/index.html b/_build/static/docs/en/cowboy/1.0/guide/ws_protocol/index.html new file mode 100644 index 00000000..05d2bdeb --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/guide/ws_protocol/index.html @@ -0,0 +1,194 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy User Guide</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>The Websocket protocol</span></h1> + +<p>This chapter explains what Websocket is and why it is a vital component of soft realtime Web applications.</p> + +<h2 id="description">Description</h2> + +<p>Websocket is an extension to HTTP that emulates plain TCP connections between the client, typically a Web browser, and the server. It uses the HTTP Upgrade mechanism to establish the connection.</p> + +<p>Websocket connections are asynchronous, unlike HTTP. This means that not only can the client send frames to the server at any time, but the server can also send frames to the client without the client initiating anything other than the Websocket connection itself. This allows the server to push data to the client directly.</p> + +<p>Websocket is an IETF standard. Cowboy supports the standard and all drafts that were previously implemented by browsers, excluding the initial flawed draft sometimes known as "version 0".</p> + +<h2 id="implementation">Implementation</h2> + +<p>Cowboy implements Websocket as a protocol upgrade. Once the upgrade is performed from the <code>init/3</code> callback, Cowboy switches to Websocket. Please consult the next chapter for more information on initiating and handling Websocket connections.</p> + +<p>The implementation of Websocket in Cowboy is validated using the Autobahn test suite, which is an extensive suite of tests covering all aspects of the protocol. Cowboy passes the suite with 100% success, including all optional tests.</p> + +<p>Cowboy's Websocket implementation also includes the x-webkit-deflate-frame compression draft which is being used by some browsers to reduce the size of data being transmitted. Cowboy will automatically use compression as long as the <code>compress</code> protocol option is set when starting the listener.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/guide/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/guide/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/index.html b/_build/static/docs/en/cowboy/1.0/index.html new file mode 100644 index 00000000..b1ab57ba --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/index.html @@ -0,0 +1,206 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy README</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Cowboy</span></h1> +<div class="service-description"> +<p>Cowboy is a small, fast and modular HTTP server written in Erlang.</p> +<h2 id="goals">Goals</h2> +<p>Cowboy aims to provide a <strong>complete</strong> HTTP stack in a <strong>small</strong> code base. It is optimized for <strong>low latency</strong> and <strong>low memory usage</strong>, in part because it uses <strong>binary strings</strong>.</p> +<p>Cowboy provides <strong>routing</strong> capabilities, selectively dispatching requests to handlers written in Erlang.</p> +<p>Because it uses Ranch for managing connections, Cowboy can easily be <strong>embedded</strong> in any other application.</p> +<p>No parameterized module. No process dictionary. <strong>Clean</strong> Erlang code.</p> +<h2 id="sponsors">Sponsors</h2> +<p>The SPDY implementation was sponsored by <a href="http://www.leofs.org">LeoFS Cloud Storage</a>.</p> +<p>The project is currently sponsored by <a href="https://kato.im">Kato.im</a>.</p> +<h2 id="online_documentation">Online documentation</h2> +<ul> +<li><a href="http://ninenines.eu/docs/en/cowboy/HEAD/guide">User guide</a></li> +<li><a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual">Function reference</a></li> +</ul> +<h2 id="offline_documentation">Offline documentation</h2> +<ul> +<li>While still online, run <code>make docs</code></li> +<li>Function reference man pages available in <code>doc/man3/</code> and <code>doc/man7/</code></li> +<li>Run <code>make install-docs</code> to install man pages on your system</li> +<li>Full documentation in Markdown available in <code>doc/markdown/</code></li> +<li>Examples available in <code>examples/</code></li> +</ul> +<h2 id="getting_help">Getting help</h2> +<ul> +<li>Official IRC Channel: #ninenines on irc.freenode.net</li> +<li><a href="http://lists.ninenines.eu">Mailing Lists</a></li> +<li><a href="http://ninenines.eu/support">Commercial Support</a></li> +</ul> +</div> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/manual/">Function Reference</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy/index.html new file mode 100644 index 00000000..892103f5 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy/index.html @@ -0,0 +1,273 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy</span></h1> + +<p>The <code>cowboy</code> module provides convenience functions for manipulating Ranch listeners.</p> + +<h2 id="types">Types</h2> + +<h3 id="http_headers">http_headers() = [{binary(), iodata()}]</h3> + +<p>HTTP headers as a list of key/values.</p> + +<h3 id="http_status">http_status() = non_neg_integer() | binary()</h3> + +<p>HTTP status.</p> + +<p>A binary status can be used to set a custom message.</p> + +<h3 id="http_version">http_version() = 'HTTP/1.1' | 'HTTP/1.0'</h3> + +<p>HTTP version.</p> + +<h3 id="onrequest_fun">onrequest_fun() = fun((cowboy_req:req()) -> cowboy_req:req())</h3> + +<p>Fun called immediately after receiving a request.</p> + +<p>It can perform any operation on the Req object, including reading the request body or replying. If a reply is sent, the processing of the request ends here, before any middleware is executed.</p> + +<h3 id="onresponse_fun">onresponse_fun() = fun((http_status(), http_headers(), iodata(), cowboy_req:req()) -> cowboy_req:req())</h3> + +<p>Fun called immediately before sending the response.</p> + +<p>It can perform any operation on the Req object, including reading the request body or replying. If a reply is sent, it overrides the reply initially sent. The callback will not be called again for the new reply.</p> + +<h2 id="exports">Exports</h2> + +<h3 id="start_http">start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) -> {ok, pid()}</h3> + +<p>Types:</p> + +<ul> +<li>Ref = ranch:ref()</li> +<li>NbAcceptors = non_neg_integer()</li> +<li>TransOpts = ranch_tcp:opts()</li> +<li>ProtoOpts = cowboy_protocol:opts()</li> +</ul> + +<p>Start listening for HTTP connections. Returns the pid for this listener's supervisor.</p> + +<h3 id="start_https">start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) -> {ok, pid()}</h3> + +<p>Types:</p> + +<ul> +<li>Ref = ranch:ref()</li> +<li>NbAcceptors = non_neg_integer()</li> +<li>TransOpts = ranch_ssl:opts()</li> +<li>ProtoOpts = cowboy_protocol:opts()</li> +</ul> + +<p>Start listening for HTTPS connections. Returns the pid for this listener's supervisor.</p> + +<h3 id="start_spdy">start_spdy(Ref, NbAcceptors, TransOpts, ProtoOpts) -> {ok, pid()}</h3> + +<p>Types:</p> + +<ul> +<li>Ref = ranch:ref()</li> +<li>NbAcceptors = non_neg_integer()</li> +<li>TransOpts = ranch_ssl:opts()</li> +<li>ProtoOpts = cowboy_spdy:opts()</li> +</ul> + +<p>Start listening for SPDY connections. Returns the pid for this listener's supervisor.</p> + +<h3 id="stop_listener">stop_listener(Ref) -> ok | {error, not_found}</h3> + +<p>Types:</p> + +<ul> +<li>Ref = ranch:ref()</li> +</ul> + +<p>Stop a previously started listener.</p> + +<h3 id="set_env">set_env(Ref, Name, Value) -> ok</h3> + +<p>Types:</p> + +<ul> +<li>Ref = ranch:ref()</li> +<li>Name = atom()</li> +<li>Value = any()</li> +</ul> + +<p>Set or update an environment value for an already running listener. This will take effect on all subsequent connections.</p> + +<h2 id="see_also">See also</h2> + +<p>The <a href="http://ninenines.eu/docs/en/ranch/HEAD/guide">Ranch guide</a> provides detailed information about how listeners work.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_app/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_app/index.html new file mode 100644 index 00000000..bd353e67 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_app/index.html @@ -0,0 +1,188 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>The Cowboy Application</span></h1> + +<p>Small, fast, modular HTTP server.</p> + +<h2 id="dependencies">Dependencies</h2> + +<p>The <code>cowboy</code> application uses the Erlang applications <code>ranch</code> for listening and accepting TCP connections, <code>crypto</code> for establishing Websocket connections, and <code>cowlib</code> for parsing and building messages for Web protocols. These dependencies must be loaded for the <code>cowboy</code> application to work. In an embedded environment this means that they need to be started with the <code>application:start/{1,2}</code> function before the <code>cowboy</code> application is started.</p> + +<p>The <code>cowboy</code> application also uses the Erlang applications <code>asn1</code>, <code>public_key</code> and <code>ssl</code> when listening for HTTPS connections. These are started automatically if they weren't before.</p> + +<h2 id="environment">Environment</h2> + +<p>The <code>cowboy</code> application does not define any application environment configuration parameters.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_handler/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_handler/index.html new file mode 100644 index 00000000..8761e46d --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_handler/index.html @@ -0,0 +1,199 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_handler</span></h1> + +<p>The <code>cowboy_handler</code> middleware executes the handler passed through the environment values <code>handler</code> and <code>handler_opts</code>, and adds the result of this execution to the environment as the value <code>result</code>, indicating that the request has been handled and received a response.</p> + +<p>Environment input:</p> + +<ul> +<li>handler = module()</li> +<li>handler_opts = any()</li> +</ul> + +<p>Environment output:</p> + +<ul> +<li>result = ok</li> +</ul> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="exports">Exports</h2> + +<p>None.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html new file mode 100644 index 00000000..1791c88e --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html @@ -0,0 +1,229 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_http_handler</span></h1> + +<p>The <code>cowboy_http_handler</code> behaviour defines the interface used by plain HTTP handlers.</p> + +<p>Unless noted otherwise, the callbacks will be executed sequentially.</p> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="init">init({TransportName, ProtocolName}, Req, Opts) -> {ok, Req, State} | {shutdown, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>TransportName = tcp | ssl | atom()</li> +<li>ProtocolName = http | atom()</li> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +<li>State = any()</li> +</ul> + +<p>Initialize the state for this request.</p> + +<p>The <code>shutdown</code> return value can be used to skip the <code>handle/2</code> call entirely.</p> + +<h3 id="handle">handle(Req, State) -> {ok, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Handle the request.</p> + +<p>This callback is where the request is handled and a response should be sent. If a response is not sent, Cowboy will send a <code>204 No Content</code> response automatically.</p> + +<h3 id="terminate">terminate(Reason, Req, State) -> ok</h3> + +<p>Types:</p> + +<ul> +<li>Reason = {normal, shutdown} | {error, atom()}</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Perform any necessary cleanup of the state.</p> + +<p>This callback should release any resource currently in use, clear any active timer and reset the process to its original state, as it might be reused for future requests sent on the same connection. Typical plain HTTP handlers rarely need to use it.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html new file mode 100644 index 00000000..94fa6f32 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html @@ -0,0 +1,245 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_loop_handler</span></h1> + +<p>The <code>cowboy_loop_handler</code> behaviour defines the interface used by HTTP handlers that do not send a response directly, instead requiring a receive loop to process Erlang messages.</p> + +<p>This interface is best fit for long-polling types of requests.</p> + +<p>The <code>init/3</code> callback will always be called, followed by zero or more calls to <code>info/3</code>. The <code>terminate/3</code> callback will always be called last.</p> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="init">init({TransportName, ProtocolName}, Req, Opts) -> {loop, Req, State} | {loop, Req, State, hibernate} | {loop, Req, State, Timeout} | {loop, Req, State, Timeout, hibernate} | {shutdown, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>TransportName = tcp | ssl | atom()</li> +<li>ProtocolName = http | atom()</li> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +<li>State = any()</li> +<li>Timeout = timeout()</li> +</ul> + +<p>Initialize the state for this request.</p> + +<p>This callback will typically be used to register this process to an event manager or a message queue in order to receive the messages the handler wants to process.</p> + +<p>The receive loop will run for a duration of up to <code>Timeout</code> milliseconds after it last received data from the socket, at which point it will stop and send a <code>204 No Content</code> reply. By default this value is set to <code>infinity</code>. It is recommended to either set this value or ensure by any other mechanism that the handler will be closed after a certain period of inactivity.</p> + +<p>The <code>hibernate</code> option will hibernate the process until it starts receiving messages.</p> + +<p>The <code>shutdown</code> return value can be used to skip the receive loop entirely.</p> + +<h3 id="info">info(Info, Req, State) -> {ok, Req, State} | {loop, Req, State} | {loop, Req, State, hibernate}</h3> + +<p>Types:</p> + +<ul> +<li>Info = any()</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Handle the Erlang message received.</p> + +<p>This function will be called every time an Erlang message has been received. The message can be any Erlang term.</p> + +<p>The <code>ok</code> return value can be used to stop the receive loop, typically because a response has been sent.</p> + +<p>The <code>hibernate</code> option will hibernate the process until it receives another message.</p> + +<h3 id="terminate">terminate(Reason, Req, State) -> ok</h3> + +<p>Types:</p> + +<ul> +<li>Reason = {normal, shutdown} | {normal, timeout} | {error, closed} | {error, overflow} | {error, atom()}</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Perform any necessary cleanup of the state.</p> + +<p>This callback will typically unregister from any event manager or message queue it registered to in <code>init/3</code>.</p> + +<p>This callback should release any resource currently in use, clear any active timer and reset the process to its original state, as it might be reused for future requests sent on the same connection.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html new file mode 100644 index 00000000..5c9189f1 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html @@ -0,0 +1,213 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_middleware</span></h1> + +<p>The <code>cowboy_middleware</code> behaviour defines the interface used by Cowboy middleware modules.</p> + +<p>Middlewares process the request sequentially in the order they are configured.</p> + +<h2 id="types">Types</h2> + +<h3 id="env">env() = [{atom(), any()}]</h3> + +<p>The environment variable.</p> + +<p>One is created for every request. It is passed to each middleware module executed and subsequently returned, optionally with its contents modified.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="execute">execute(Req, Env) -> {ok, Req, Env} | {suspend, Module, Function, Args} | {halt, Req} | {error, StatusCode, Req}</h3> + +<p>Types:</p> + +<ul> +<li>Req = cowboy_req:req()</li> +<li>Env = env()</li> +<li>Module = module()</li> +<li>Function = atom()</li> +<li>Args = [any()]</li> +<li>StatusCode = cowboy:http_status()</li> +</ul> + +<p>Execute the middleware.</p> + +<p>The <code>ok</code> return value indicates that everything went well and that Cowboy should continue processing the request. A response may or may not have been sent.</p> + +<p>The <code>suspend</code> return value will hibernate the process until an Erlang message is received. Note that when resuming, any previous stacktrace information will be gone.</p> + +<p>The <code>halt</code> return value stops Cowboy from doing any further processing of the request, even if there are middlewares that haven't been executed yet. The connection may be left open to receive more requests from the client.</p> + +<p>The <code>error</code> return value sends an error response identified by the <code>StatusCode</code> and then proceeds to terminate the connection. Middlewares that haven't been executed yet will not be called.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html new file mode 100644 index 00000000..89e549c1 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html @@ -0,0 +1,244 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_protocol</span></h1> + +<p>The <code>cowboy_protocol</code> module implements HTTP/1.1 and HTTP/1.0 as a Ranch protocol.</p> + +<h2 id="types">Types</h2> + +<h3 id="opts">opts() = [{compress, boolean()} | {env, cowboy_middleware:env()} | {max_empty_lines, non_neg_integer()} | {max_header_name_length, non_neg_integer()} | {max_header_value_length, non_neg_integer()} | {max_headers, non_neg_integer()} | {max_keepalive, non_neg_integer()} | {max_request_line_length, non_neg_integer()} | {middlewares, [module()]} | {onrequest, cowboy:onrequest_fun()} | {onresponse, cowboy:onresponse_fun()} | {timeout, timeout()}]</h3> + +<p>Configuration for the HTTP protocol handler.</p> + +<p>This configuration is passed to Cowboy when starting listeners using <code>cowboy:start_http/4</code> or <code>cowboy:start_https/4</code> functions.</p> + +<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p> + +<h2 id="option_descriptions">Option descriptions</h2> + +<p>The default value is given next to the option name.</p> + +<h3 id="compress ">compress (false)</h3> + +<p>When enabled, Cowboy will attempt to compress the response body.</p> + +<h3 id="env ">env ([{listener, Ref}])</h3> + +<p>Initial middleware environment.</p> + +<h3 id="max_empty_lines ">max_empty_lines (5)</h3> + +<p>Maximum number of empty lines before a request.</p> + +<h3 id="max_header_name_length ">max_header_name_length (64)</h3> + +<p>Maximum length of header names.</p> + +<h3 id="max_header_value_length ">max_header_value_length (4096)</h3> + +<p>Maximum length of header values.</p> + +<h3 id="max_headers ">max_headers (100)</h3> + +<p>Maximum number of headers allowed per request.</p> + +<h3 id="max_keepalive ">max_keepalive (100)</h3> + +<p>Maximum number of requests allowed per connection.</p> + +<h3 id="max_request_line_length ">max_request_line_length (4096)</h3> + +<p>Maximum length of the request line.</p> + +<h3 id="middlewares ">middlewares ([cowboy_router, cowboy_handler])</h3> + +<p>List of middlewares to execute for every requests.</p> + +<h3 id="onrequest ">onrequest (undefined)</h3> + +<p>Fun called every time a request is received.</p> + +<h3 id="onresponse ">onresponse (undefined)</h3> + +<p>Fun called every time a response is sent.</p> + +<h3 id="timeout ">timeout (5000)</h3> + +<p>Time in ms with no requests before Cowboy closes the connection.</p> + +<h2 id="exports">Exports</h2> + +<p>None.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_req/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_req/index.html new file mode 100644 index 00000000..b3e122d4 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_req/index.html @@ -0,0 +1,854 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_req</span></h1> + +<p>The <code>cowboy_req</code> module provides functions to access, manipulate and respond to requests.</p> + +<p>The functions in this module follow patterns for their return types, based on the kind of function.</p> + +<ul> +<li>access: <code>{Value, Req}</code></li> +<li>action: <code>{Result, Req} | {Result, Value, Req} | {error, atom()}</code></li> +<li>modification: <code>Req</code></li> +<li>question: <code>boolean()</code></li> +</ul> + +<p>The only exception is the <code>chunk/2</code> function which may return <code>ok</code>.</p> + +<p>Whenever <code>Req</code> is returned, you must use this returned value and ignore any previous you may have had. This value contains various state informations which are necessary for Cowboy to do some lazy evaluation or cache results where appropriate.</p> + +<p>All functions which perform an action should only be called once. This includes reading the request body or replying. Cowboy will generally throw an error on the second call.</p> + +<p>It is highly discouraged to pass the Req object to another process. Doing so and calling <code>cowboy_req</code> functions from it leads to undefined behavior.</p> + +<h2 id="types">Types</h2> + +<h3 id="body_opts">body_opts() = [{continue, boolean()} | {length, non_neg_integer()} | {read_length, non_neg_integer()} | {read_timeout, timeout()} | {transfer_decode, transfer_decode_fun(), any()} | {content_decode, content_decode_fun()}]</h3> + +<p>Request body reading options.</p> + +<h3 id="cookie_opts">cookie_opts() = [{max_age, non_neg_integer()} | {domain, binary()} | {path, binary()} | {secure, boolean()} | {http_only, boolean()}]</h3> + +<p>Cookie options.</p> + +<h3 id="req">req() - opaque to the user</h3> + +<p>The Req object.</p> + +<p>All functions in this module receive a <code>Req</code> as argument, and most of them return a new object labelled <code>Req2</code> in the function descriptions below.</p> + +<h2 id="request_related_exports">Request related exports</h2> + +<h3 id="binding">binding(Name, Req) -> binding(Name, Req, undefined)</h3> + +<h3 id="binding">binding(Name, Req, Default) -> {Value, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = atom()</li> +<li>Default = any()</li> +<li>Value = any() | Default</li> +</ul> + +<p>Return the value for the given binding.</p> + +<p>By default the value is a binary, however constraints may change the type of this value (for example automatically converting numbers to integer).</p> + +<h3 id="bindings">bindings(Req) -> {[{Name, Value}], Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = atom()</li> +<li>Value = any()</li> +</ul> + +<p>Return all bindings.</p> + +<p>By default the value is a binary, however constraints may change the type of this value (for example automatically converting numbers to integer).</p> + +<h3 id="cookie">cookie(Name, Req) -> cookie(Name, Req, undefined)</h3> + +<h3 id="cookie">cookie(Name, Req, Default) -> {Value, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Default = any()</li> +<li>Value = binary() | Default</li> +</ul> + +<p>Return the value for the given cookie.</p> + +<p>Cookie names are case sensitive.</p> + +<h3 id="cookies">cookies(Req) -> {[{Name, Value}], Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Value = binary()</li> +</ul> + +<p>Return all cookies.</p> + +<h3 id="header">header(Name, Req) -> header(Name, Req, undefined)</h3> + +<h3 id="header">header(Name, Req, Default) -> {Value, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Default = any()</li> +<li>Value = binary() | Default</li> +</ul> + +<p>Return the value for the given header.</p> + +<p>While header names are case insensitive, this function expects the name to be a lowercase binary.</p> + +<h3 id="headers">headers(Req) -> {Headers, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Headers = cowboy:http_headers()</li> +</ul> + +<p>Return all headers.</p> + +<h3 id="host">host(Req) -> {Host, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Host = binary()</li> +</ul> + +<p>Return the requested host.</p> + +<h3 id="host_info">host_info(Req) -> {HostInfo, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>HostInfo = cowboy_router:tokens() | undefined</li> +</ul> + +<p>Return the extra tokens from matching against <code>...</code> during routing.</p> + +<h3 id="host_url">host_url(Req) -> {HostURL, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>HostURL = binary() | undefined</li> +</ul> + +<p>Return the requested URL excluding the path component.</p> + +<p>This function will always return <code>undefined</code> until the <code>cowboy_router</code> middleware has been executed. This includes the <code>onrequest</code> hook.</p> + +<h3 id="meta">meta(Name, Req) -> meta(Name, Req, undefined)</h3> + +<h3 id="meta">meta(Name, Req, Default) -> {Value, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = atom()</li> +<li>Default = any()</li> +<li>Value = any()</li> +</ul> + +<p>Return metadata about the request.</p> + +<h3 id="method">method(Req) -> {Method, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Method = binary()</li> +</ul> + +<p>Return the method.</p> + +<p>Methods are case sensitive. Standard methods are always uppercase.</p> + +<h3 id="parse_header">parse_header(Name, Req) -></h3> + +<h3 id="parse_header">parse_header(Name, Req, Default) -> {ok, ParsedValue, Req2} | {undefined, Value, Req2} | {error, badarg}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Default = any()</li> +<li>ParsedValue - see below</li> +<li>Value = any()</li> +</ul> + +<p>Parse the given header.</p> + +<p>While header names are case insensitive, this function expects the name to be a lowercase binary.</p> + +<p>The <code>parse_header/2</code> function will call <code>parser_header/3</code> with a different default value depending on the header being parsed. The following table summarizes the default values used.</p> + +<table class="table-bordered table-condensed table-striped"> +<thead> +<tr><th>Header name</th><th>Default value</th></tr> +</thead> +<tbody> +<tr><td>transfer-encoding</td><td><code>[<<"identity">>]</code></td></tr> +<tr><td>Any other header</td><td><code>undefined</code></td></tr> +</tbody> +</table> + +<p>The parsed value differs depending on the header being parsed. The following table summarizes the different types returned.</p> + +<table class="table-bordered table-condensed table-striped"> +<thead> +<tr><th>Header name</th><th>Type</th></tr> +</thead> +<tbody> +<tr><td>accept</td><td><code>[{{Type, SubType, Params}, Quality, AcceptExt}]</code></td></tr> +<tr><td>accept-charset</td><td><code>[{Charset, Quality}]</code></td></tr> +<tr><td>accept-encoding</td><td><code>[{Encoding, Quality}]</code></td></tr> +<tr><td>accept-language</td><td><code>[{LanguageTag, Quality}]</code></td></tr> +<tr><td>authorization</td><td><code>{AuthType, Credentials}</code></td></tr> +<tr><td>content-length</td><td><code>non_neg_integer()</code></td></tr> +<tr><td>content-type</td><td><code>{Type, SubType, ContentTypeParams}</code></td></tr> +<tr><td>cookie</td><td><code>[{binary(), binary()}]</code></td></tr> +<tr><td>expect</td><td><code>[Expect | {Expect, ExpectValue, Params}]</code></td></tr> +<tr><td>if-match</td><td><code>'*' | [{weak | strong, OpaqueTag}]</code></td></tr> +<tr><td>if-modified-since</td><td><code>calendar:datetime()</code></td></tr> +<tr><td>if-none-match</td><td><code>'*' | [{weak | strong, OpaqueTag}]</code></td></tr> +<tr><td>if-unmodified-since</td><td><code>calendar:datetime()</code></td></tr> +<tr><td>range</td><td><code>{Unit, [Range]}</code></td></tr> +<tr><td>sec-websocket-protocol</td><td><code>[binary()]</code></td></tr> +<tr><td>transfer-encoding</td><td><code>[binary()]</code></td></tr> +<tr><td>upgrade</td><td><code>[binary()]</code></td></tr> +<tr><td>x-forwarded-for</td><td><code>[binary()]</code></td></tr> +</tbody> +</table> + +<p>Types for the above table:</p> + +<ul> +<li>Type = SubType = Charset = Encoding = LanguageTag = binary()</li> +<li>AuthType = Expect = OpaqueTag = Unit = binary()</li> +<li>Params = ContentTypeParams = [{binary(), binary()}]</li> +<li>Quality = 0..1000</li> +<li>AcceptExt = [{binary(), binary()} | binary()]</li> +<li>Credentials - see below</li> +<li>Range = {non_neg_integer(), non_neg_integer() | infinity} | neg_integer()</li> +</ul> + +<p>The cookie names and values, the values of the sec-websocket-protocol and x-forwarded-for headers, the values in <code>AcceptExt</code> and <code>Params</code>, the authorization <code>Credentials</code>, the <code>ExpectValue</code> and <code>OpaqueTag</code> are case sensitive. All values in <code>ContentTypeParams</code> are case sensitive except the value of the charset parameter, which is case insensitive. All other values are case insensitive and will be returned as lowercase.</p> + +<p>The headers accept, accept-encoding and cookie headers can return an empty list. Others will return <code>{error, badarg}</code> if the header value is empty.</p> + +<p>The authorization header parsing code currently only supports basic HTTP authentication. The <code>Credentials</code> type is thus <code>{Username, Password}</code> with <code>Username</code> and <code>Password</code> being <code>binary()</code>.</p> + +<p>The range header value <code>Range</code> can take three forms:</p> + +<ul> +<li><code>{From, To}</code>: from <code>From</code> to <code>To</code> units</li> +<li><code>{From, infinity}</code>: everything after <code>From</code> units</li> +<li><code>-Final</code>: the final <code>Final</code> units</li> +</ul> + +<p>An <code>undefined</code> tuple will be returned if Cowboy doesn't know how to parse the requested header.</p> + +<h3 id="path">path(Req) -> {Path, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Path = binary()</li> +</ul> + +<p>Return the requested path.</p> + +<h3 id="path_info">path_info(Req) -> {PathInfo, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>PathInfo = cowboy_router:tokens() | undefined</li> +</ul> + +<p>Return the extra tokens from matching against <code>...</code> during routing.</p> + +<h3 id="peer">peer(Req) -> {Peer, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Peer = {inet:ip_address(), inet:port_number()}</li> +</ul> + +<p>Return the client's IP address and port number.</p> + +<h3 id="port">port(Req) -> {Port, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Port = inet:port_number()</li> +</ul> + +<p>Return the request's port.</p> + +<p>The port returned by this function is obtained by parsing the host header. It may be different than the actual port the client used to connect to the Cowboy server.</p> + +<h3 id="qs">qs(Req) -> {QueryString, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>QueryString = binary()</li> +</ul> + +<p>Return the request's query string.</p> + +<h3 id="qs_val">qs_val(Name, Req) -> qs_val(Name, Req, undefined)</h3> + +<h3 id="qs_val">qs_val(Name, Req, Default) -> {Value, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Default = any()</li> +<li>Value = binary() | true</li> +</ul> + +<p>Return a value from the request's query string.</p> + +<p>The value <code>true</code> will be returned when the name was found in the query string without an associated value.</p> + +<h3 id="qs_vals">qs_vals(Req) -> {[{Name, Value}], Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Value = binary() | true</li> +</ul> + +<p>Return the request's query string as a list of tuples.</p> + +<p>The value <code>true</code> will be returned when a name was found in the query string without an associated value.</p> + +<h3 id="set_meta">set_meta(Name, Value, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Name = atom()</li> +<li>Value = any()</li> +</ul> + +<p>Set metadata about the request.</p> + +<p>An existing value will be overwritten.</p> + +<h3 id="url">url(Req) -> {URL, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>URL = binary() | undefined</li> +</ul> + +<p>Return the requested URL.</p> + +<p>This function will always return <code>undefined</code> until the <code>cowboy_router</code> middleware has been executed. This includes the <code>onrequest</code> hook.</p> + +<h3 id="version">version(Req) -> {Version, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Version = cowboy:http_version()</li> +</ul> + +<p>Return the HTTP version used for this request.</p> + +<h2 id="request_body_related_exports">Request body related exports</h2> + +<h3 id="body">body(Req) -> body(Req, [])</h3> + +<h3 id="body">body(Req, Opts) -> {ok, Data, Req2} | {more, Data, Req2} | {error, Reason}</h3> + +<p>Types:</p> + +<ul> +<li>Opts = [body_opt()]</li> +<li>Data = binary()</li> +<li>Reason = atom()</li> +</ul> + +<p>Read the request body.</p> + +<p>This function will read a chunk of the request body. If there is more data to be read after this function call, then a <code>more</code> tuple is returned. Otherwise an <code>ok</code> tuple is returned.</p> + +<p>Cowboy will automatically send a <code>100 Continue</code> reply if required. If this behavior is not desirable, it can be disabled by setting the <code>continue</code> option to <code>false</code>.</p> + +<p>Cowboy will by default attempt to read up to 8MB of the body, but in chunks of 1MB. It will use a timeout of 15s per chunk. All these values can be changed using the <code>length</code>, <code>read_length</code> and <code>read_timeout</code> options respectively. Note that the size of the data may not be the same as requested as the decoding functions may grow or shrink it, and Cowboy makes not attempt at returning an exact amount.</p> + +<p>Cowboy will properly handle chunked transfer-encoding by default. If any other transfer-encoding or content-encoding has been used for the request, custom decoding functions can be used. The <code>content_decode</code> and <code>transfer_decode</code> options allow setting the decode functions manually.</p> + +<p>After the body has been streamed fully, Cowboy will remove the transfer-encoding header from the Req object, and add the content-length header if it wasn't already there.</p> + +<p>This function can only be called once. Cowboy will not cache the result of this call.</p> + +<h3 id="body_length">body_length(Req) -> {Length, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Length = non_neg_integer() | undefined</li> +</ul> + +<p>Return the length of the request body.</p> + +<p>The length will only be returned if the request does not use any transfer-encoding and if the content-length header is present.</p> + +<h3 id="body_qs">body_qs(Req) -> body_qs(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3> + +<h3 id="body_qs">body_qs(Req, Opts) -> {ok, [{Name, Value}], Req2} | {badlength, Req2} | {error, Reason}</h3> + +<p>Types:</p> + +<ul> +<li>Opts = [body_opt()]</li> +<li>Name = binary()</li> +<li>Value = binary() | true</li> +<li>Reason = chunked | badlength | atom()</li> +</ul> + +<p>Return the request body as a list of tuples.</p> + +<p>This function will parse the body assuming the content-type application/x-www-form-urlencoded, commonly used for the query string.</p> + +<p>This function calls <code>body/2</code> for reading the body, with the same options it received. By default it will attempt to read a body of 64KB in one chunk, with a timeout of 5s. If the body is larger then a <code>badlength</code> tuple is returned.</p> + +<p>This function can only be called once. Cowboy will not cache the result of this call.</p> + +<h3 id="has_body">has_body(Req) -> boolean()</h3> + +<p>Return whether the request has a body.</p> + +<h3 id="part">part(Req) -> part(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3> + +<h3 id="part">part(Req, Opts) -> {ok, Headers, Req2} | {done, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Opts = [body_opt()]</li> +<li>Headers = cow_multipart:headers()</li> +</ul> + +<p>Read the headers for the next part of the multipart message.</p> + +<p>Cowboy will skip any data remaining until the beginning of the next part. This includes the preamble to the multipart message but also the body of a previous part if it hasn't been read. Both are skipped automatically when calling this function.</p> + +<p>The headers returned are MIME headers, NOT HTTP headers. They can be parsed using the functions from the <code>cow_multipart</code> module. In addition, the <code>cow_multipart:form_data/1</code> function can be used to quickly figure out <code>multipart/form-data</code> messages. It takes the list of headers and returns whether this part is a simple form field or a file being uploaded.</p> + +<p>Note that once a part has been read, or skipped, it cannot be read again.</p> + +<p>This function calls <code>body/2</code> for reading the body, with the same options it received. By default it will only read chunks of 64KB with a timeout of 5s. This is tailored for reading part headers, not for skipping the previous part's body. You might want to consider skipping large parts manually.</p> + +<h3 id="part_body">part_body(Req) -> part_body(Req, [])</h3> + +<h3 id="part_body">part_body(Req, Opts) -> {ok, Data, Req2} | {more, Data, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>Opts = [body_opt()]</li> +<li>Data = binary()</li> +</ul> + +<p>Read the body of the current part of the multipart message.</p> + +<p>This function calls <code>body/2</code> for reading the body, with the same options it received. It uses the same defaults.</p> + +<p>If there are more data to be read from the socket for this part, the function will return what it could read inside a <code>more</code> tuple. Otherwise, it will return an <code>ok</code> tuple.</p> + +<p>Calling this function again after receiving a <code>more</code> tuple will return another chunk of body. The last chunk will be returned inside an <code>ok</code> tuple.</p> + +<p>Note that once the body has been read, fully or partially, it cannot be read again.</p> + +<h2 id="response_related_exports">Response related exports</h2> + +<h3 id="chunk">chunk(Data, Req) -> ok | {error, Reason}</h3> + +<p>Types:</p> + +<ul> +<li>Data = iodata()</li> +<li>Reason = atom()</li> +</ul> + +<p>Send a chunk of data.</p> + +<p>This function should be called as many times as needed to send data chunks after calling <code>chunked_reply/{2,3}</code>.</p> + +<p>When the method is HEAD, no data will actually be sent.</p> + +<p>If the request uses HTTP/1.0, the data is sent directly without wrapping it in an HTTP/1.1 chunk, providing compatibility with older clients.</p> + +<h3 id="chunked_reply">chunked_reply(StatusCode, Req) -> chunked_reply(StatusCode, [], Req)</h3> + +<h3 id="chunked_reply">chunked_reply(StatusCode, Headers, Req) -> {ok, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>StatusCode = cowboy:http_status()</li> +<li>Headers = cowboy:http_headers()</li> +</ul> + +<p>Send a response using chunked transfer-encoding.</p> + +<p>This function effectively sends the response status line and headers to the client.</p> + +<p>This function will not send any body set previously. After this call the handler must use the <code>chunk/2</code> function repeatedly to send the body in as many chunks as needed.</p> + +<p>If the request uses HTTP/1.0, the data is sent directly without wrapping it in an HTTP/1.1 chunk, providing compatibility with older clients.</p> + +<p>This function can only be called once, with the exception of overriding the response in the <code>onresponse</code> hook.</p> + +<h3 id="continue">continue(Req) -> ok | {error, Reason}</h3> + +<p>Types:</p> + +<ul> +<li>Reason = atom()</li> +</ul> + +<p>Send a 100 Continue intermediate reply.</p> + +<p>This reply is required before the client starts sending the body when the request contains the <code>expect</code> header with the <code>100-continue</code> value.</p> + +<p>Cowboy will send this automatically when required. However you may want to do it manually by disabling this behavior with the <code>continue</code> body option and then calling this function.</p> + +<h3 id="delete_resp_header">delete_resp_header(Name, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +</ul> + +<p>Delete the given response header.</p> + +<p>While header names are case insensitive, this function expects the name to be a lowercase binary.</p> + +<h3 id="has_resp_body">has_resp_body(Req) -> boolean()</h3> + +<p>Return whether a response body has been set.</p> + +<p>This function will return false if a response body has been set with a length of 0.</p> + +<h3 id="has_resp_header">has_resp_header(Name, Req) -> boolean()</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +</ul> + +<p>Return whether the given response header has been set.</p> + +<p>While header names are case insensitive, this function expects the name to be a lowercase binary.</p> + +<h3 id="reply">reply(StatusCode, Req) -> reply(StatusCode, [], Req)</h3> + +<h3 id="reply">reply(StatusCode, Headers, Req) - see below</h3> + +<h3 id="reply">reply(StatusCode, Headers, Body, Req) -> {ok, Req2}</h3> + +<p>Types:</p> + +<ul> +<li>StatusCode = cowboy:http_status()</li> +<li>Headers = cowboy:http_headers()</li> +<li>Body = iodata()</li> +</ul> + +<p>Send a response.</p> + +<p>This function effectively sends the response status line, headers and body to the client, in a single send function call.</p> + +<p>The <code>reply/2</code> and <code>reply/3</code> functions will send the body set previously, if any. The <code>reply/4</code> function overrides any body set previously and sends <code>Body</code> instead.</p> + +<p>If a body function was set, and <code>reply/2</code> or <code>reply/3</code> was used, it will be called before returning.</p> + +<p>No more data can be sent to the client after this function returns.</p> + +<p>This function can only be called once, with the exception of overriding the response in the <code>onresponse</code> hook.</p> + +<h3 id="set_resp_body">set_resp_body(Body, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Body = iodata()</li> +</ul> + +<p>Set a response body.</p> + +<p>This body will not be sent if <code>chunked_reply/{2,3}</code> or <code>reply/4</code> is used, as they override it.</p> + +<h3 id="set_resp_body_fun">set_resp_body_fun(Fun, Req) -> Req2</h3> + +<h3 id="set_resp_body_fun">set_resp_body_fun(Length, Fun, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Fun = fun((Socket, Transport) -> ok)</li> +<li>Socket = inet:socket()</li> +<li>Transport = module()</li> +<li>Length = non_neg_integer()</li> +</ul> + +<p>Set a fun for sending the response body.</p> + +<p>If a <code>Length</code> is provided, it will be sent in the content-length header in the response. It is recommended to set the length if it can be known in advance. Otherwise, the transfer-encoding header will be set to identity.</p> + +<p>This function will only be called if the response is sent using the <code>reply/2</code> or <code>reply/3</code> function.</p> + +<p>The fun will receive the Ranch <code>Socket</code> and <code>Transport</code> as arguments. Only send and sendfile operations are supported.</p> + +<h3 id="set_resp_body_fun">set_resp_body_fun(chunked, Fun, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Fun = fun((ChunkFun) -> ok)</li> +<li>ChunkFun = fun((iodata()) -> ok | {error, atom()})</li> +</ul> + +<p>Set a fun for sending the response body using chunked transfer-encoding.</p> + +<p>This function will only be called if the response is sent using the <code>reply/2</code> or <code>reply/3</code> function.</p> + +<p>The fun will receive another fun as argument. This fun is to be used to send chunks in a similar way to the <code>chunk/2</code> function, except the fun only takes one argument, the data to be sent in the chunk.</p> + +<h3 id="set_resp_cookie">set_resp_cookie(Name, Value, Opts, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Name = iodata()</li> +<li>Value = iodata()</li> +<li>Opts = cookie_opts()</li> +</ul> + +<p>Set a cookie in the response.</p> + +<p>Cookie names are case sensitive.</p> + +<h3 id="set_resp_header">set_resp_header(Name, Value, Req) -> Req2</h3> + +<p>Types:</p> + +<ul> +<li>Name = binary()</li> +<li>Value = iodata()</li> +</ul> + +<p>Set a response header.</p> + +<p>You should use <code>set_resp_cookie/4</code> instead of this function to set cookies.</p> + +<h2 id="misc._exports">Misc. exports</h2> + +<h3 id="compact">compact(Req) -> Req2</h3> + +<p>Remove any non-essential data from the Req object.</p> + +<p>Long-lived connections usually only need to manipulate the Req object at initialization. Compacting allows saving up memory by discarding extraneous information.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_rest/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_rest/index.html new file mode 100644 index 00000000..31af54c0 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_rest/index.html @@ -0,0 +1,698 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_rest</span></h1> + +<p>The <code>cowboy_rest</code> module implements REST semantics on top of the HTTP protocol.</p> + +<p>This module cannot be described as a behaviour due to most of the callbacks it defines being optional. It has the same semantics as a behaviour otherwise.</p> + +<p>The only mandatory callback is <code>init/3</code>, needed to perform the protocol upgrade.</p> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="meta_values">Meta values</h2> + +<h3 id="charset">charset</h3> + +<p>Type: binary()</p> + +<p>Negotiated charset.</p> + +<p>This value may not be defined if no charset was negotiated.</p> + +<h3 id="language">language</h3> + +<p>Type: binary()</p> + +<p>Negotiated language.</p> + +<p>This value may not be defined if no language was negotiated.</p> + +<h3 id="media_type">media_type</h3> + +<p>Type: {binary(), binary(), '*' | [{binary(), binary()}]}</p> + +<p>Negotiated media-type.</p> + +<p>The media-type is the content-type, excluding the charset.</p> + +<p>This value is always defined after the call to <code>content_types_provided/2</code>.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="init">init({TransportName, ProtocolName}, Req, Opts) -> {upgrade, protocol, cowboy_rest} | {upgrade, protocol, cowboy_rest, Req, Opts}</h3> + +<p>Types:</p> + +<ul> +<li>TransportName = tcp | ssl | atom()</li> +<li>ProtocolName = http | atom()</li> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +</ul> + +<p>Upgrade the protocol to <code>cowboy_rest</code>.</p> + +<p>This is the only mandatory callback.</p> + +<h3 id="rest_init">rest_init(Req, Opts) -> {ok, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +<li>State = any()</li> +</ul> + +<p>Initialize the state for this request.</p> + +<h3 id="rest_terminate">rest_terminate(Req, State) -> ok</h3> + +<p>Types:</p> + +<ul> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Perform any necessary cleanup of the state.</p> + +<p>This callback should release any resource currently in use, clear any active timer and reset the process to its original state, as it might be reused for future requests sent on the same connection.</p> + +<h3 id="callback">Callback(Req, State) -> {Value, Req, State} | {halt, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>Callback - one of the REST callbacks described below</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +<li>Value - see the REST callbacks description below</li> +</ul> + +<p>Please see the REST callbacks description below for details on the <code>Value</code> type, the default value if the callback is not defined, and more general information on when the callback is called and what its intended use is.</p> + +<p>The <code>halt</code> tuple can be returned to stop REST processing. It is up to the resource code to send a reply before that, otherwise a <code>204 No Content</code> will be sent.</p> + +<h2 id="rest_callbacks_description">REST callbacks description</h2> + +<h3 id="allowed_methods">allowed_methods</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: [binary()]</li> +<li>Default value: [<<"GET">>, <<"HEAD">>, <<"OPTIONS">>]</li> +</ul> + +<p>Return the list of allowed methods.</p> + +<p>Methods are case sensitive. Standard methods are always uppercase.</p> + +<h3 id="allow_missing_post">allow_missing_post</h3> + +<ul> +<li>Methods: POST</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether POST is allowed when the resource doesn't exist.</p> + +<p>Returning <code>true</code> here means that a new resource will be created. The URL to the created resource should also be returned from the <code>AcceptResource</code> callback.</p> + +<h3 id="charsets_provided">charsets_provided</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: [binary()]</li> +<li>Skip to the next step if undefined</li> +</ul> + +<p>Return the list of charsets the resource provides.</p> + +<p>The list must be ordered in order of preference.</p> + +<p>If the accept-charset header was not sent, the first charset in the list will be selected. Otherwise Cowboy will select the most appropriate charset from the list.</p> + +<p>The chosen charset will be set in the <code>Req</code> object as the meta value <code>charset</code>.</p> + +<p>While charsets are case insensitive, this callback is expected to return them as lowercase binary.</p> + +<h3 id="content_types_accepted">content_types_accepted</h3> + +<ul> +<li>Methods: POST, PUT, PATCH</li> +<li>No default</li> +</ul> + +<p>Types:</p> + +<ul> +<li>Value = [{binary() | {Type, SubType, Params}, AcceptResource}]</li> +<li>Type = SubType = binary()</li> +<li>Params = '*' | [{binary(), binary()}]</li> +<li>AcceptResource = atom()</li> +</ul> + +<p>Return the list of content-types the resource accepts.</p> + +<p>The list must be ordered in order of preference.</p> + +<p>Each content-type can be given either as a binary string or as a tuple containing the type, subtype and parameters.</p> + +<p>Cowboy will select the most appropriate content-type from the list. If any parameter is acceptable, then the tuple form should be used with parameters set to <code>'*'</code>. If the parameters value is set to <code>[]</code> only content-type values with no parameters will be accepted. All parameter values are treated in a case sensitive manner except the <code>charset</code> parameter, if present, which is case insensitive.</p> + +<p>This function will be called for POST, PUT and PATCH requests. It is entirely possible to define different callbacks for different methods if the handling of the request differs. Simply verify what the method is with <code>cowboy_req:method/1</code> and return a different list for each methods.</p> + +<p>The <code>AcceptResource</code> value is the name of the callback that will be called if the content-type matches. It is defined as follow.</p> + +<ul> +<li>Value type: true | {true, URL} | false</li> +<li>No default</li> +</ul> + +<p>Process the request body.</p> + +<p>This function should create or update the resource with the information contained in the request body. This information may be full or partial depending on the request method.</p> + +<p>If the request body was processed successfully, <code>true</code> must be returned. If the request method is POST, <code>{true, URL}</code> may be returned instead, and Cowboy will redirect the client to the location of the newly created resource.</p> + +<p>If a response body must be sent, the appropriate media-type, charset and language can be retrieved using the <code>cowboy_req:meta/{2,3}</code> functions. The respective keys are <code>media_type</code>, <code>charset</code> and <code>language</code>. The body can be set using <code>cowboy_req:set_resp_body/2</code>.</p> + +<h3 id="content_types_provided">content_types_provided</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Default value: [{{<<"text">>, <<"html">>, '*'}, to_html}]</li> +</ul> + +<p>Types:</p> + +<ul> +<li>Value = [{binary() | {Type, SubType, Params}, ProvideResource}]</li> +<li>Type = SubType = binary()</li> +<li>Params = '*' | [{binary(), binary()}]</li> +<li>ProvideResource = atom()</li> +</ul> + +<p>Return the list of content-types the resource provides.</p> + +<p>The list must be ordered in order of preference.</p> + +<p>Each content-type can be given either as a binary string or as a tuple containing the type, subtype and parameters.</p> + +<p>Cowboy will select the most appropriate content-type from the list. If any parameter is acceptable, then the tuple form should be used with parameters set to <code>'*'</code>. If the parameters value is set to <code>[]</code> only content-type values with no parameters will be accepted. All parameter values are treated in a case sensitive manner except the <code>charset</code> parameter, if present, which is case insensitive.</p> + +<p>The <code>ProvideResource</code> value is the name of the callback that will be called if the content-type matches. It will only be called when a representation of the resource needs to be returned. It is defined as follow.</p> + +<ul> +<li>Methods: GET, HEAD</li> +<li>Value type: iodata() | {stream, Fun} | {stream, Len, Fun} | {chunked, ChunkedFun}</li> +<li>No default</li> +</ul> + +<p>Return the response body.</p> + +<p>The response body may be provided directly or through a fun. If a fun tuple is returned, the appropriate <code>set_resp_body_fun</code> function will be called. Please refer to the documentation for these functions for more information about the types.</p> + +<p>The call to this callback happens a good time after the call to <code>content_types_provided/2</code>, when it is time to start rendering the response body.</p> + +<h3 id="delete_completed">delete_completed</h3> + +<ul> +<li>Methods: DELETE</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the delete action has been completed.</p> + +<p>This function should return <code>false</code> if there is no guarantee that the resource gets deleted immediately from the system, including from any internal cache.</p> + +<p>When this function returns <code>false</code>, a <code>202 Accepted</code> response will be sent instead of a <code>200 OK</code> or <code>204 No Content</code>.</p> + +<h3 id="delete_resource">delete_resource</h3> + +<ul> +<li>Methods: DELETE</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Delete the resource.</p> + +<p>The value returned indicates if the action was successful, regardless of whether the resource is immediately deleted from the system.</p> + +<h3 id="expires">expires</h3> + +<ul> +<li>Methods: GET, HEAD</li> +<li>Value type: calendar:datetime() | binary() | undefined</li> +<li>Default value: undefined</li> +</ul> + +<p>Return the date of expiration of the resource.</p> + +<p>This date will be sent as the value of the expires header.</p> + +<h3 id="forbidden">forbidden</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether access to the resource is forbidden.</p> + +<p>A <code>403 Forbidden</code> response will be sent if this function returns <code>true</code>. This status code means that access is forbidden regardless of authentication, and that the request shouldn't be repeated.</p> + +<h3 id="generate_etag">generate_etag</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: binary() | {weak | strong, binary()}</li> +<li>Default value: undefined</li> +</ul> + +<p>Return the entity tag of the resource.</p> + +<p>This value will be sent as the value of the etag header.</p> + +<p>If a binary is returned, then the value will be parsed to the tuple form automatically. The value must be in the same format as the etag header, including quotes.</p> + +<h3 id="is_authorized">is_authorized</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: true | {false, AuthHeader}</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the user is authorized to perform the action.</p> + +<p>This function should be used to perform any necessary authentication of the user before attempting to perform any action on the resource.</p> + +<p>If the authentication fails, the value returned will be sent as the value for the www-authenticate header in the <code>401 Unauthorized</code> response.</p> + +<h3 id="is_conflict">is_conflict</h3> + +<ul> +<li>Methods: PUT</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the put action results in a conflict.</p> + +<p>A <code>409 Conflict</code> response will be sent if this function returns <code>true</code>.</p> + +<h3 id="known_content_type">known_content_type</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the content-type is known.</p> + +<p>This function determines if the server understands the content-type, regardless of its use by the resource.</p> + +<h3 id="known_methods">known_methods</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: [binary()]</li> +<li>Default value: [<<"GET">>, <<"HEAD">>, <<"POST">>, <<"PUT">>, <<"PATCH">>, <<"DELETE">>, <<"OPTIONS">>]</li> +</ul> + +<p>Return the list of known methods.</p> + +<p>The full list of methods known by the server should be returned, regardless of their use in the resource.</p> + +<p>The default value lists the methods Cowboy knows and implement in <code>cowboy_rest</code>.</p> + +<p>Methods are case sensitive. Standard methods are always uppercase.</p> + +<h3 id="languages_provided">languages_provided</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: [binary()]</li> +<li>Skip to the next step if undefined</li> +</ul> + +<p>Return the list of languages the resource provides.</p> + +<p>The list must be ordered in order of preference.</p> + +<p>If the accept-language header was not sent, the first language in the list will be selected. Otherwise Cowboy will select the most appropriate language from the list.</p> + +<p>The chosen language will be set in the <code>Req</code> object as the meta value <code>language</code>.</p> + +<p>While languages are case insensitive, this callback is expected to return them as lowercase binary.</p> + +<h3 id="last_modified">last_modified</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: calendar:datetime()</li> +<li>Default value: undefined</li> +</ul> + +<p>Return the date of last modification of the resource.</p> + +<p>This date will be used to test against the if-modified-since and if-unmodified-since headers, and sent as the last-modified header in the response of GET and HEAD requests.</p> + +<h3 id="malformed_request">malformed_request</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the request is malformed.</p> + +<p>Cowboy has already performed all the necessary checks by the time this function is called, so few resources are expected to implement it.</p> + +<p>The check is to be done on the request itself, not on the request body, which is processed later.</p> + +<h3 id="moved_permanently">moved_permanently</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: {true, URL} | false</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the resource was permanently moved.</p> + +<p>If it was, its new URL is also returned and sent in the location header in the response.</p> + +<h3 id="moved_temporarily">moved_temporarily</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PATCH, DELETE</li> +<li>Value type: {true, URL} | false</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the resource was temporarily moved.</p> + +<p>If it was, its new URL is also returned and sent in the location header in the response.</p> + +<h3 id="multiple_choices">multiple_choices</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether there are multiple representations of the resource.</p> + +<p>This function should be used to inform the client if there are different representations of the resource, for example different content-type. If this function returns <code>true</code>, the response body should include information about these different representations using <code>cowboy_req:set_resp_body/2</code>. The content-type of the response should be the one previously negociated and that can be obtained by calling <code>cowboy_req:meta(media_type, Req)</code>.</p> + +<h3 id="options">options</h3> + +<ul> +<li>Methods: OPTIONS</li> +<li>Value type: ok</li> +<li>Default value: ok</li> +</ul> + +<p>Handle a request for information.</p> + +<p>The response should inform the client the communication options available for this resource.</p> + +<p>By default, Cowboy will send a <code>200 OK</code> response with the allow header set.</p> + +<h3 id="previously_existed">previously_existed</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PATCH, DELETE</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the resource existed previously.</p> + +<h3 id="resource_exists">resource_exists</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the resource exists.</p> + +<p>If it exists, conditional headers will be tested before attempting to perform the action. Otherwise, Cowboy will check if the resource previously existed first.</p> + +<h3 id="service_available">service_available</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the service is available.</p> + +<p>This function can be used to test that all relevant backend systems are up and able to handle requests.</p> + +<p>A <code>503 Service Unavailable</code> response will be sent if this function returns <code>false</code>.</p> + +<h3 id="uri_too_long">uri_too_long</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: false</li> +</ul> + +<p>Return whether the requested URI is too long.</p> + +<p>Cowboy has already performed all the necessary checks by the time this function is called, so few resources are expected to implement it.</p> + +<p>A <code>414 Request-URI Too Long</code> response will be sent if this function returns <code>true</code>.</p> + +<h3 id="valid_content_headers">valid_content_headers</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the content-* headers are valid.</p> + +<p>This also applies to the transfer-encoding header. This function must return <code>false</code> for any unknown content-* headers, or if the headers can't be understood. The function <code>cowboy_req:parse_header/2</code> can be used to quickly check the headers can be parsed.</p> + +<p>A <code>501 Not Implemented</code> response will be sent if this function returns <code>false</code>.</p> + +<h3 id="valid_entity_length">valid_entity_length</h3> + +<ul> +<li>Methods: all</li> +<li>Value type: boolean()</li> +<li>Default value: true</li> +</ul> + +<p>Return whether the request body length is within acceptable boundaries.</p> + +<p>A <code>413 Request Entity Too Large</code> response will be sent if this function returns <code>false</code>.</p> + +<h3 id="variances">variances</h3> + +<ul> +<li>Methods: GET, HEAD, POST, PUT, PATCH, DELETE</li> +<li>Value type: [binary()]</li> +<li>Default value: []</li> +</ul> + +<p>Return the list of headers that affect the representation of the resource.</p> + +<p>These request headers return the same resource but with different parameters, like another language or a different content-type.</p> + +<p>Cowboy will automatically add the accept, accept-language and accept-charset headers to the list if the respective functions were defined in the resource.</p> + +<p>This operation is performed right before the <code>resource_exists/2</code> callback. All responses past that point will contain the vary header which holds this list.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_router/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_router/index.html new file mode 100644 index 00000000..fd191650 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_router/index.html @@ -0,0 +1,247 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_router</span></h1> + +<p>The <code>cowboy_router</code> middleware maps the requested host and path to the handler to be used for processing the request. It uses the dispatch rules compiled from the routes given to the <code>compile/1</code> function for this purpose. It adds the handler name and options to the environment as the values <code>handler</code> and <code>handler_opts</code> respectively.</p> + +<p>Environment input:</p> + +<ul> +<li>dispatch = dispatch_rules()</li> +</ul> + +<p>Environment output:</p> + +<ul> +<li>handler = module()</li> +<li>handler_opts = any()</li> +</ul> + +<h2 id="types">Types</h2> + +<h3 id="bindings">bindings() = [{atom(), binary()}]</h3> + +<p>List of bindings found during routing.</p> + +<h3 id="constraints">constraints() = [IntConstraint | FunConstraint]</h3> + +<p>Types:</p> + +<ul> +<li>IntConstraint = {atom(), int}</li> +<li>FunConstraint = {atom(), function, Fun}</li> +<li>Fun = fun((binary()) -> true | {true, any()} | false)</li> +</ul> + +<p>List of constraints to apply to the bindings.</p> + +<p>The int constraint will convert the binding to an integer. The fun constraint allows writing custom code for checking the bindings. Returning a new value from that fun allows replacing the current binding with a new value.</p> + +<h3 id="dispatch_rules">dispatch_rules() - opaque to the user</h3> + +<p>Rules for dispatching request used by Cowboy.</p> + +<h3 id="routes">routes() = [{Host, Paths} | {Host, constraints(), Paths}]</h3> + +<p>Types:</p> + +<ul> +<li>Host = Path = '_' | iodata()</li> +<li>Paths = [{Path, Handler, Opts} | {Path, constraints(), Handler, Opts}]</li> +<li>Handler = module()</li> +<li>Opts = any()</li> +</ul> + +<p>Human readable list of routes mapping hosts and paths to handlers.</p> + +<p>The syntax for routes is defined in the user guide.</p> + +<h3 id="tokens">tokens() = [binary()]</h3> + +<p>List of host_info and path_info tokens found during routing.</p> + +<h2 id="exports">Exports</h2> + +<h3 id="compile">compile(Routes) -> Dispatch</h3> + +<p>Types:</p> + +<ul> +<li>Routes = routes()</li> +<li>Dispatch = dispatch_rules()</li> +</ul> + +<p>Compile the routes for use by Cowboy.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html new file mode 100644 index 00000000..39f0611c --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html @@ -0,0 +1,212 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_spdy</span></h1> + +<p>The <code>cowboy_spdy</code> module implements SPDY/3 as a Ranch protocol.</p> + +<h2 id="types">Types</h2> + +<h3 id="opts">opts() = [{env, cowboy_middleware:env()} | {middlewares, [module()]} | {onrequest, cowboy:onrequest_fun()} | {onresponse, cowboy:onresponse_fun()}]</h3> + +<p>Configuration for the SPDY protocol handler.</p> + +<p>This configuration is passed to Cowboy when starting listeners using the <code>cowboy:start_spdy/4</code> function.</p> + +<p>It can be updated without restarting listeners using the Ranch functions <code>ranch:get_protocol_options/1</code> and <code>ranch:set_protocol_options/2</code>.</p> + +<h2 id="option_descriptions">Option descriptions</h2> + +<p>The default value is given next to the option name.</p> + +<h3 id="env ">env ([{listener, Ref}])</h3> + +<p>Initial middleware environment.</p> + +<h3 id="middlewares ">middlewares ([cowboy_router, cowboy_handler])</h3> + +<p>List of middlewares to execute for every requests.</p> + +<h3 id="onrequest ">onrequest (undefined)</h3> + +<p>Fun called every time a request is received.</p> + +<h3 id="onresponse ">onresponse (undefined)</h3> + +<p>Fun called every time a response is sent.</p> + +<h2 id="exports">Exports</h2> + +<p>None.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_static/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_static/index.html new file mode 100644 index 00000000..8d6dd8a5 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_static/index.html @@ -0,0 +1,194 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_static</span></h1> + +<p>The <code>cowboy_static</code> module implements file serving capabilities by using the REST semantics provided by <code>cowboy_rest</code>.</p> + +<h2 id="types">Types</h2> + +<h3 id="opts">opts() = {priv_file, atom(), string() | binary()} | {priv_file, atom(), string() | binary(), extra()} | {file, string() | binary()} | {file, string() | binary(), extra()} | {priv_dir, atom(), string() | binary()} | {priv_dir, atom(), string() | binary(), extra()} | {dir, string() | binary()} | {dir, string() | binary(), extra()}</h3> + +<p>Configuration for the static handler.</p> + +<p>The handler can be configured for sending either one file or a directory (including its subdirectories).</p> + +<p>Extra options allow you to define how the etag should be calculated and how the mimetype of files should be detected. They are defined as follow, but do note that these types are not exported, only the <code>opts/0</code> type is public.</p> + +<h3 id="extra">extra() = [extra_etag() | extra_mimetypes()]</h3> + +<h3 id="extra_etag">extra_etag() = {etag, module(), function()} | {etag, false}</h3> + +<h3 id="extra_mimetypes">extra_mimetypes() = {mimetypes, module(), function()} | {mimetypes, binary() | {binary(), binary(), [{binary(), binary()}]}}</h3> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html new file mode 100644 index 00000000..53b52bd4 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_sub_protocol</span></h1> + +<p>The <code>cowboy_sub_protocol</code> behaviour defines the interface used by modules that implement a protocol on top of HTTP.</p> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="upgrade">upgrade(Req, Env, Handler, Opts) -> {ok, Req, Env} | {suspend, Module, Function, Args} | {halt, Req} | {error, StatusCode, Req}</h3> + +<p>Types:</p> + +<ul> +<li>Req = cowboy_req:req()</li> +<li>Env = env()</li> +<li>Handler = module()</li> +<li>Opts = any()</li> +<li>Module = module()</li> +<li>Function = atom()</li> +<li>Args = [any()]</li> +<li>StatusCode = cowboy:http_status()</li> +</ul> + +<p>Upgrade the protocol.</p> + +<p>Please refer to the <code>cowboy_middleware</code> manual for a description of the return values.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html new file mode 100644 index 00000000..e05e9829 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html @@ -0,0 +1,208 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_websocket</span></h1> + +<p>The <code>cowboy_websocket</code> module implements the Websocket protocol.</p> + +<p>The callbacks for websocket handlers are defined in the manual for the <code>cowboy_websocket_handler</code> behaviour.</p> + +<h2 id="types">Types</h2> + +<h3 id="close_code">close_code() = 1000..4999</h3> + +<p>Reason for closing the connection.</p> + +<h3 id="frame">frame() = close | ping | pong | {text | binary | close | ping | pong, iodata()} | {close, close_code(), iodata()}</h3> + +<p>Frames that can be sent to the client.</p> + +<h2 id="meta_values">Meta values</h2> + +<h3 id="websocket_compress">websocket_compress</h3> + +<p>Type: true | false</p> + +<p>Whether a websocket compression extension in in use.</p> + +<h3 id="websocket_version">websocket_version</h3> + +<p>Type: 7 | 8 | 13</p> + +<p>The version of the Websocket protocol being used.</p> + +<h2 id="exports">Exports</h2> + +<p>None.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html b/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html new file mode 100644 index 00000000..62ddd89a --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html @@ -0,0 +1,273 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>cowboy_websocket_handler</span></h1> + +<p>The <code>cowboy_websocket_handler</code> behaviour defines the interface used by Websocket handlers.</p> + +<p>The <code>init/3</code> and <code>websocket_init/3</code> callbacks will always be called, followed by zero or more calls to <code>websocket_handle/3</code> and <code>websocket_info/3</code>. The <code>websocket_terminate/3</code> will always be called last.</p> + +<h2 id="types">Types</h2> + +<p>None.</p> + +<h2 id="callbacks">Callbacks</h2> + +<h3 id="init">init({TransportName, ProtocolName}, Req, Opts) -> {upgrade, protocol, cowboy_websocket} | {upgrade, protocol, cowboy_websocket, Req, Opts}</h3> + +<p>Types:</p> + +<ul> +<li>TransportName = tcp | ssl | atom()</li> +<li>ProtocolName = http | atom()</li> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +</ul> + +<p>Upgrade the protocol to <code>cowboy_websocket</code>.</p> + +<h3 id="websocket_init">websocket_init(TransportName, Req, Opts) -> {ok, Req, State} | {ok, Req, State, hibernate} | {ok, Req, State, Timeout} | {ok, Req, State, Timeout, hibernate} | {shutdown, Req}</h3> + +<p>Types:</p> + +<ul> +<li>TransportName = tcp | ssl | atom()</li> +<li>Req = cowboy_req:req()</li> +<li>Opts = any()</li> +<li>State = any()</li> +<li>Timeout = timeout()</li> +</ul> + +<p>Initialize the state for this session.</p> + +<p>This function is called before the upgrade to Websocket occurs. It can be used to negotiate Websocket protocol extensions with the client. It will typically be used to register this process to an event manager or a message queue in order to receive the messages the handler wants to process.</p> + +<p>The connection will stay up for a duration of up to <code>Timeout</code> milliseconds after it last received data from the socket, at which point it will stop and close the connection. By default this value is set to <code>infinity</code>. It is recommended to either set this value or ensure by any other mechanism that the handler will be closed after a certain period of inactivity.</p> + +<p>The <code>hibernate</code> option will hibernate the process until it starts receiving either data from the Websocket connection or Erlang messages.</p> + +<p>The <code>shutdown</code> return value can be used to close the connection before upgrading to Websocket.</p> + +<h3 id="websocket_handle">websocket_handle(InFrame, Req, State) -> {ok, Req, State} | {ok, Req, State, hibernate} | {reply, OutFrame | [OutFrame], Req, State} | {reply, OutFrame | [OutFrame], Req, State, hibernate} | {shutdown, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>InFrame = {text | binary | ping | pong, binary()}</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +<li>OutFrame = cowboy_websocket:frame()</li> +</ul> + +<p>Handle the data received from the Websocket connection.</p> + +<p>This function will be called every time data is received from the Websocket connection.</p> + +<p>The <code>shutdown</code> return value can be used to close the connection. A close reply will also result in the connection being closed.</p> + +<p>The <code>hibernate</code> option will hibernate the process until it receives new data from the Websocket connection or an Erlang message.</p> + +<h3 id="websocket_info">websocket_info(Info, Req, State) -> {ok, Req, State} | {ok, Req, State, hibernate} | {reply, OutFrame | [OutFrame], Req, State} | {reply, OutFrame | [OutFrame], Req, State, hibernate} | {shutdown, Req, State}</h3> + +<p>Types:</p> + +<ul> +<li>Info = any()</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +<li>OutFrame = cowboy_websocket:frame()</li> +</ul> + +<p>Handle the Erlang message received.</p> + +<p>This function will be called every time an Erlang message has been received. The message can be any Erlang term.</p> + +<p>The <code>shutdown</code> return value can be used to close the connection. A close reply will also result in the connection being closed.</p> + +<p>The <code>hibernate</code> option will hibernate the process until it receives another message or new data from the Websocket connection.</p> + +<h3 id="websocket_terminate">websocket_terminate(Reason, Req, State) -> ok</h3> + +<p>Types:</p> + +<ul> +<li>Reason = {normal, shutdown | timeout} | {remote, closed} | {remote, cowboy_websocket:close_code(), binary()} | {error, badencoding | badframe | closed | atom()}</li> +<li>Req = cowboy_req:req()</li> +<li>State = any()</li> +</ul> + +<p>Perform any necessary cleanup of the state.</p> + +<p>The connection will be closed and the process stopped right after this call.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/http_status_codes/index.html b/_build/static/docs/en/cowboy/1.0/manual/http_status_codes/index.html new file mode 100644 index 00000000..d668474f --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/http_status_codes/index.html @@ -0,0 +1,305 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>HTTP status codes</span></h1> + +<p>This chapter aims to list all HTTP status codes that Cowboy may return, with details on the reasons why. The list given here only includes the replies that Cowboy sends, not user replies.</p> + +<h3 id="100 continue">100 Continue</h3> + +<p>When the client sends an <code>expect: 100-continue</code> header, Cowboy automatically sends a this status code before trying to read the request body. This behavior can be disabled using the appropriate body option.</p> + +<h3 id="101 switching protocols">101 Switching Protocols</h3> + +<p>This is the status code sent when switching to the Websocket protocol.</p> + +<h3 id="200 ok">200 OK</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="201 created">201 Created</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="202 accepted">202 Accepted</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="204 no content">204 No Content</h3> + +<p>This status code is sent when the processing of a request ends without any reply having been sent. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p> + +<h3 id="300 multiple choices">300 Multiple Choices</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="301 moved permanently">301 Moved Permanently</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="303 see other">303 See Other</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="304 not modified">304 Not Modified</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="307 temporary redirect">307 Temporary Redirect</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="400 bad request">400 Bad Request</h3> + +<p>Cowboy will send this status code for any of the following reasons:</p> + +<ul> +<li>Too many empty lines were sent before the request.</li> +<li>The request-line could not be parsed.</li> +<li>Too many headers were sent.</li> +<li>A header name was too long.</li> +<li>A header value was too long.</li> +<li>The host header was missing from an HTTP/1.1 request.</li> +<li>The host header could not be parsed.</li> +<li>The requested host was not found.</li> +<li>The requested path could not be parsed.</li> +<li>The accept header could not be parsed when using REST.</li> +<li>REST under normal conditions.</li> +<li>A Websocket upgrade failed.</li> +</ul> + +<h3 id="401 unauthorized">401 Unauthorized</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="403 forbidden">403 Forbidden</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="404 not found">404 Not Found</h3> + +<p>This status code is sent when the router successfully resolved the host but didn't find a matching path for the request. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p> + +<h3 id="405 method not allowed">405 Method Not Allowed</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="406 not acceptable">406 Not Acceptable</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="408 request timeout">408 Request Timeout</h3> + +<p>Cowboy will send this status code to the client if the client started to send a request, indicated by the request-line being received fully, but failed to send all headers in a reasonable time.</p> + +<h3 id="409 conflict">409 Conflict</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="410 gone">410 Gone</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="412 precondition failed">412 Precondition Failed</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="413 request entity too large">413 Request Entity Too Large</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="414 request-uri too long">414 Request-URI Too Long</h3> + +<p>Cowboy will send this status code to the client if the request-line is too long. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p> + +<h3 id="415 unsupported media type">415 Unsupported Media Type</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="500 internal server error">500 Internal Server Error</h3> + +<p>This status code is sent when a crash occurs in HTTP, loop or REST handlers, or when an invalid return value is returned. It may also be sent by <code>cowboy_rest</code> under normal conditions.</p> + +<h3 id="501 not implemented">501 Not Implemented</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="503 service unavailable">503 Service Unavailable</h3> + +<p>This status code is sent by <code>cowboy_rest</code>.</p> + +<h3 id="505 http version not supported">505 HTTP Version Not Supported</h3> + +<p>Cowboy only supports the versions 1.0 and 1.1 of HTTP. In all other cases this status code is sent back to the client and the connection is closed.</p> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> diff --git a/_build/static/docs/en/cowboy/1.0/manual/index.html b/_build/static/docs/en/cowboy/1.0/manual/index.html new file mode 100644 index 00000000..b5b11489 --- /dev/null +++ b/_build/static/docs/en/cowboy/1.0/manual/index.html @@ -0,0 +1,197 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Nine Nines Support: Cowboy Function Reference</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <!-- Change them or set them up as you like --> + <meta name="description" content=""> + <meta name="author" content="(Soft10) Pol Cámara"> + + <!-- Stylesheets --> + <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 href="js/google-code-prettify/prettify.css" rel="stylesheet"> --> + <link href="/css/sh99s.css" rel="stylesheet"/> + + <!-- Enables html5 support on older browsers, other js is placed at the end of the page to speed up loading --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <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"> + <link rel="alternate" href="/feeds/atom.xml" type="application/atom+xml" title="Nine Nines Atom Feed"> + </head> + + <body class="big_text docs"> + <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"> + <!-- Top navigation and social icons--> + <div id="side-header"> + <nav> + <ul> + <li><a title="Erlang training" href="/training">Training</a></li> + <li><a title="Technical publications" href="/articles">Articles</a></li> + <li><a title="Our talks" href="/talks">Talks</a></li> + <li class="active"><a title="Our services" href="/support">Pricing & Sponsoring</a></li> + <li><a title="Community support" href="http://lists.ninenines.eu">Mailing Lists</a></li> + <li><a title="Contact us" href="mailto:[email protected]">Contact</a></li> + </ul> + </nav> + <ul id="social"> + <li> + <a href="https://github.com/ninenines" title="Check our Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a> + </li> + <li class="dropdown" id="twitter-links"> + <a href="#twitter-links" class="dropdown-toggle" data-toggle="dropdown" title="Follow us on Twitter"> + <img src="/img/ico_twitter.png" data-hover="/img/ico_twitter_alt.png" alt="Twitter"> + </a> + <ul class="dropdown-menu"> + <li><a title="Visit Loïc Hoguin's Twitter Account" href="http://twitter.com/lhoguin">@lhoguin</a></li> + <!-- <li class="divider"></li> + <li><a title="Visit our official Twitter account" href="#">@99s</a></li> --> + </ul> + </li> + <!-- <li> + <a href="/css/" title="Add us on Linkedin"><img src="/img/ico_linkedin.png" data-hover="img/ico_linkedin_alt.png" alt="Linkedin"></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>Cowboy Function Reference</span></h1> + +<p>The function reference documents the public interface of Cowboy.</p> + +<ul> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_app">The Cowboy Application</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy">cowboy</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_handler">cowboy_handler</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_http_handler">cowboy_http_handler</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_loop_handler">cowboy_loop_handler</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_middleware">cowboy_middleware</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_protocol">cowboy_protocol</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_req">cowboy_req</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_rest">cowboy_rest</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_router">cowboy_router</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_spdy">cowboy_spdy</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_static">cowboy_static</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_sub_protocol">cowboy_sub_protocol</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_websocket">cowboy_websocket</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/cowboy_websocket_handler">cowboy_websocket_handler</a></li> +<li><a href="/docs/en/cowboy/1.0/manual/http_status_codes">HTTP status codes</a></li> +</ul> + + +<!-- a.code --> +</div> + +<div class="span3 sidecol"> +<div class="input-append"> +<form id="form-search" class="form-search" action="#"> + <input id="input-search" type="text" placeholder="Function search" autocomplete="off" autofocus class="input-medium search-query span2"> + <button type="submit" class="btn btn-success">Go</button> +</form> +</div> + +<h3 id="docs-nav">Navigation</h3> + +<h3>See also</h3><ul><li><a href="/docs/en/cowboy/1.0/guide/">User Guide</a></li><li><a href="/docs/en/cowboy/1.0/index.html">README</a></li></ul> + +<h3>Version select</h3> +<ul> + + <li><a href="/docs/en/cowboy/1.0/manual/"><strong>1.0</strong></a></li> + + <li><a href="/docs/en/cowboy/HEAD/manual/"><strong>HEAD</strong></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 © Nine Nines 2012-2014</p> + </div> + </div> + </div> + </footer> + + <!-- Javascript --> + <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> + + +<script type="text/javascript" src="/js/shCore.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushBash.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushErlang.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushJScript.js"></script> +<script type="text/javascript" src="/js/shlang/shBrushPlain.js"></script> +<script type="text/javascript">SyntaxHighlighter.all();</script> + +<script type="text/javascript" src="/js/fuse.min.js"></script> +<script type="text/javascript"> +$(document).ready(function(){ + var f; + + $.getJSON("/docs/db.json", function(data){ + f = new Fuse(data, {keys: ["n"], threshold: 0.3}); + $("<ul id=\"search-results\">").insertAfter("#form-search"); + }); + + $("#input-search").keyup(function(e){if(f){if (e.which != 13 ){ + var results = f.search($(this).val()); + if (results.length == 0){ + $("#form-search").attr("action", "#"); + }else{ + $("#form-search").attr("action", results[0].l); + } + + $("#search-results").empty(); + for (var i = 0; i < 10 && i < results.length; i++){ + $("<li><a href=\"" + results[i].l + "\">" + results[i].n + "</a></li>") + .appendTo("#search-results"); + } + }}}); +}); +</script> + + </body> +</html> |