summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-03-28 15:36:42 +0200
committerLoïc Hoguin <[email protected]>2016-03-28 15:36:42 +0200
commitfe3492a98de29942477b061cd02c92246f4bf85a (patch)
tree2255b796a657e6e4dfb72beec1141258d17f1220 /docs
downloadninenines.eu-fe3492a98de29942477b061cd02c92246f4bf85a.tar.gz
ninenines.eu-fe3492a98de29942477b061cd02c92246f4bf85a.tar.bz2
ninenines.eu-fe3492a98de29942477b061cd02c92246f4bf85a.zip
Initial commit, new website system
Diffstat (limited to 'docs')
-rw-r--r--docs/db.json1
-rw-r--r--docs/en/cowboy/1.0/guide/architecture/index.html202
-rw-r--r--docs/en/cowboy/1.0/guide/broken_clients/index.html212
-rw-r--r--docs/en/cowboy/1.0/guide/cookies/index.html273
-rw-r--r--docs/en/cowboy/1.0/guide/erlang_beginners/index.html196
-rw-r--r--docs/en/cowboy/1.0/guide/erlang_web/index.html248
-rw-r--r--docs/en/cowboy/1.0/guide/getting_started/index.html299
-rw-r--r--docs/en/cowboy/1.0/guide/hooks/index.html239
-rw-r--r--docs/en/cowboy/1.0/guide/http_handlers/index.html279
-rw-r--r--docs/en/cowboy/1.0/guide/http_req_life/index.html251
-rw-r--r--docs/en/cowboy/1.0/guide/http_req_resp.pngbin0 -> 33228 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/http_req_resp.svg558
-rw-r--r--docs/en/cowboy/1.0/guide/index.html250
-rw-r--r--docs/en/cowboy/1.0/guide/introduction/index.html212
-rw-r--r--docs/en/cowboy/1.0/guide/loop_handlers/index.html264
-rw-r--r--docs/en/cowboy/1.0/guide/middlewares/index.html226
-rw-r--r--docs/en/cowboy/1.0/guide/modern_web/index.html282
-rw-r--r--docs/en/cowboy/1.0/guide/multipart_intro/index.html198
-rw-r--r--docs/en/cowboy/1.0/guide/multipart_req/index.html261
-rw-r--r--docs/en/cowboy/1.0/guide/req/index.html390
-rw-r--r--docs/en/cowboy/1.0/guide/req_body/index.html296
-rw-r--r--docs/en/cowboy/1.0/guide/resource_design/index.html294
-rw-r--r--docs/en/cowboy/1.0/guide/resp/index.html327
-rw-r--r--docs/en/cowboy/1.0/guide/rest_cond.pngbin0 -> 111628 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_cond.svg1656
-rw-r--r--docs/en/cowboy/1.0/guide/rest_conneg.pngbin0 -> 78133 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_conneg.svg1135
-rw-r--r--docs/en/cowboy/1.0/guide/rest_delete.pngbin0 -> 122185 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_delete.svg1718
-rw-r--r--docs/en/cowboy/1.0/guide/rest_flowcharts/index.html304
-rw-r--r--docs/en/cowboy/1.0/guide/rest_get_head.pngbin0 -> 99942 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_get_head.svg1523
-rw-r--r--docs/en/cowboy/1.0/guide/rest_handlers/index.html289
-rw-r--r--docs/en/cowboy/1.0/guide/rest_options.pngbin0 -> 8539 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_options.svg387
-rw-r--r--docs/en/cowboy/1.0/guide/rest_principles/index.html238
-rw-r--r--docs/en/cowboy/1.0/guide/rest_put_post_patch.pngbin0 -> 218656 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_put_post_patch.svg2856
-rw-r--r--docs/en/cowboy/1.0/guide/rest_start.pngbin0 -> 118210 bytes
-rw-r--r--docs/en/cowboy/1.0/guide/rest_start.svg1468
-rw-r--r--docs/en/cowboy/1.0/guide/routing/index.html365
-rw-r--r--docs/en/cowboy/1.0/guide/static_handlers/index.html280
-rw-r--r--docs/en/cowboy/1.0/guide/upgrade_protocol/index.html200
-rw-r--r--docs/en/cowboy/1.0/guide/ws_handlers/index.html327
-rw-r--r--docs/en/cowboy/1.0/guide/ws_protocol/index.html194
-rw-r--r--docs/en/cowboy/1.0/index.html1
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy/index.html273
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_app/index.html188
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_handler/index.html199
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html229
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html245
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_middleware/index.html213
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_protocol/index.html244
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_req/index.html854
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_rest/index.html698
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_router/index.html247
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_spdy/index.html212
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_static/index.html194
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html203
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_websocket/index.html208
-rw-r--r--docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html273
-rw-r--r--docs/en/cowboy/1.0/manual/http_status_codes/index.html305
-rw-r--r--docs/en/cowboy/1.0/manual/index.html197
-rw-r--r--docs/en/cowboy/2.0/guide/architecture.asciidoc48
-rw-r--r--docs/en/cowboy/2.0/guide/architecture/index.html191
-rw-r--r--docs/en/cowboy/2.0/guide/broken_clients.asciidoc61
-rw-r--r--docs/en/cowboy/2.0/guide/broken_clients/index.html205
-rw-r--r--docs/en/cowboy/2.0/guide/constraints.asciidoc54
-rw-r--r--docs/en/cowboy/2.0/guide/constraints/index.html211
-rw-r--r--docs/en/cowboy/2.0/guide/cookies.asciidoc163
-rw-r--r--docs/en/cowboy/2.0/guide/cookies/index.html303
-rw-r--r--docs/en/cowboy/2.0/guide/erlang_beginners.asciidoc36
-rw-r--r--docs/en/cowboy/2.0/guide/erlang_beginners/index.html175
-rw-r--r--docs/en/cowboy/2.0/guide/erlang_web.asciidoc176
-rw-r--r--docs/en/cowboy/2.0/guide/erlang_web/index.html300
-rw-r--r--docs/en/cowboy/2.0/guide/getting_started.asciidoc141
-rw-r--r--docs/en/cowboy/2.0/guide/getting_started/index.html289
-rw-r--r--docs/en/cowboy/2.0/guide/handlers.asciidoc105
-rw-r--r--docs/en/cowboy/2.0/guide/handlers/index.html242
-rw-r--r--docs/en/cowboy/2.0/guide/hooks.asciidoc46
-rw-r--r--docs/en/cowboy/2.0/guide/hooks/index.html185
-rw-r--r--docs/en/cowboy/2.0/guide/http_req_resp.pngbin0 -> 28370 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/http_req_resp.svg520
-rw-r--r--docs/en/cowboy/2.0/guide/index.html326
-rw-r--r--docs/en/cowboy/2.0/guide/introduction.asciidoc56
-rw-r--r--docs/en/cowboy/2.0/guide/introduction/index.html193
-rw-r--r--docs/en/cowboy/2.0/guide/loop_handlers.asciidoc146
-rw-r--r--docs/en/cowboy/2.0/guide/loop_handlers/index.html284
-rw-r--r--docs/en/cowboy/2.0/guide/middlewares.asciidoc69
-rw-r--r--docs/en/cowboy/2.0/guide/middlewares/index.html228
-rw-r--r--docs/en/cowboy/2.0/guide/modern_web.asciidoc200
-rw-r--r--docs/en/cowboy/2.0/guide/modern_web/index.html329
-rw-r--r--docs/en/cowboy/2.0/guide/multipart.asciidoc169
-rw-r--r--docs/en/cowboy/2.0/guide/multipart/index.html305
-rw-r--r--docs/en/cowboy/2.0/guide/overview.asciidoc150
-rw-r--r--docs/en/cowboy/2.0/guide/overview/index.html285
-rw-r--r--docs/en/cowboy/2.0/guide/req.asciidoc247
-rw-r--r--docs/en/cowboy/2.0/guide/req/index.html443
-rw-r--r--docs/en/cowboy/2.0/guide/req_body.asciidoc152
-rw-r--r--docs/en/cowboy/2.0/guide/req_body/index.html312
-rw-r--r--docs/en/cowboy/2.0/guide/resource_design.asciidoc221
-rw-r--r--docs/en/cowboy/2.0/guide/resource_design/index.html350
-rw-r--r--docs/en/cowboy/2.0/guide/resp.asciidoc201
-rw-r--r--docs/en/cowboy/2.0/guide/resp/index.html357
-rw-r--r--docs/en/cowboy/2.0/guide/rest_cond.pngbin0 -> 111628 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_cond.svg1656
-rw-r--r--docs/en/cowboy/2.0/guide/rest_conneg.pngbin0 -> 78133 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_conneg.svg1135
-rw-r--r--docs/en/cowboy/2.0/guide/rest_delete.pngbin0 -> 122185 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_delete.svg1718
-rw-r--r--docs/en/cowboy/2.0/guide/rest_flowcharts.asciidoc248
-rw-r--r--docs/en/cowboy/2.0/guide/rest_flowcharts/index.html380
-rw-r--r--docs/en/cowboy/2.0/guide/rest_get_head.pngbin0 -> 99942 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_get_head.svg1523
-rw-r--r--docs/en/cowboy/2.0/guide/rest_handlers.asciidoc133
-rw-r--r--docs/en/cowboy/2.0/guide/rest_handlers/index.html231
-rw-r--r--docs/en/cowboy/2.0/guide/rest_options.pngbin0 -> 8539 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_options.svg387
-rw-r--r--docs/en/cowboy/2.0/guide/rest_principles.asciidoc160
-rw-r--r--docs/en/cowboy/2.0/guide/rest_principles/index.html289
-rw-r--r--docs/en/cowboy/2.0/guide/rest_put_post_patch.pngbin0 -> 218656 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_put_post_patch.svg2856
-rw-r--r--docs/en/cowboy/2.0/guide/rest_start.pngbin0 -> 105640 bytes
-rw-r--r--docs/en/cowboy/2.0/guide/rest_start.svg1356
-rw-r--r--docs/en/cowboy/2.0/guide/routing.asciidoc224
-rw-r--r--docs/en/cowboy/2.0/guide/routing/index.html397
-rw-r--r--docs/en/cowboy/2.0/guide/static_files.asciidoc171
-rw-r--r--docs/en/cowboy/2.0/guide/static_files/index.html316
-rw-r--r--docs/en/cowboy/2.0/guide/sub_protocols.asciidoc68
-rw-r--r--docs/en/cowboy/2.0/guide/sub_protocols/index.html206
-rw-r--r--docs/en/cowboy/2.0/guide/ws_handlers.asciidoc196
-rw-r--r--docs/en/cowboy/2.0/guide/ws_handlers/index.html339
-rw-r--r--docs/en/cowboy/2.0/guide/ws_protocol.asciidoc43
-rw-r--r--docs/en/cowboy/2.0/guide/ws_protocol/index.html182
-rw-r--r--docs/en/cowboy/2.0/index.html1
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy/index.html328
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_app/index.html171
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_handler/index.html365
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_loop/index.html289
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_middleware/index.html230
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_protocol/index.html279
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req/index.html1423
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_rest/index.html508
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_router/index.html247
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_static/index.html188
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html224
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_websocket/index.html352
-rw-r--r--docs/en/cowboy/2.0/manual/http_status_codes/index.html407
-rw-r--r--docs/en/cowboy/2.0/manual/index.html209
-rw-r--r--docs/en/cowboy/HEAD/guide/index.html1
-rw-r--r--docs/en/cowboy/HEAD/index.html1
-rw-r--r--docs/en/cowboy/HEAD/manual/index.html1
-rw-r--r--docs/en/cowboy/index.html1
-rw-r--r--docs/en/erlang.mk/1/guide/app.asciidoc426
-rw-r--r--docs/en/erlang.mk/1/guide/app/index.html699
-rw-r--r--docs/en/erlang.mk/1/guide/asciidoc.asciidoc82
-rw-r--r--docs/en/erlang.mk/1/guide/asciidoc/index.html230
-rw-r--r--docs/en/erlang.mk/1/guide/ci.asciidoc6
-rw-r--r--docs/en/erlang.mk/1/guide/ci/index.html137
-rw-r--r--docs/en/erlang.mk/1/guide/common_test.asciidoc91
-rw-r--r--docs/en/erlang.mk/1/guide/common_test/index.html249
-rw-r--r--docs/en/erlang.mk/1/guide/compat.asciidoc90
-rw-r--r--docs/en/erlang.mk/1/guide/compat/index.html220
-rw-r--r--docs/en/erlang.mk/1/guide/contributing.asciidoc116
-rw-r--r--docs/en/erlang.mk/1/guide/contributing/index.html261
-rw-r--r--docs/en/erlang.mk/1/guide/coverage.asciidoc6
-rw-r--r--docs/en/erlang.mk/1/guide/coverage/index.html137
-rw-r--r--docs/en/erlang.mk/1/guide/deps.asciidoc472
-rw-r--r--docs/en/erlang.mk/1/guide/deps/index.html768
-rw-r--r--docs/en/erlang.mk/1/guide/dialyzer.asciidoc73
-rw-r--r--docs/en/erlang.mk/1/guide/dialyzer/index.html207
-rw-r--r--docs/en/erlang.mk/1/guide/edoc.asciidoc48
-rw-r--r--docs/en/erlang.mk/1/guide/edoc/index.html193
-rw-r--r--docs/en/erlang.mk/1/guide/escripts.asciidoc6
-rw-r--r--docs/en/erlang.mk/1/guide/escripts/index.html137
-rw-r--r--docs/en/erlang.mk/1/guide/eunit.asciidoc122
-rw-r--r--docs/en/erlang.mk/1/guide/eunit/index.html279
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins.asciidoc77
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins/index.html215
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc48
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins_list/index.html197
-rw-r--r--docs/en/erlang.mk/1/guide/getting_started.asciidoc299
-rw-r--r--docs/en/erlang.mk/1/guide/getting_started/index.html462
-rw-r--r--docs/en/erlang.mk/1/guide/history.asciidoc66
-rw-r--r--docs/en/erlang.mk/1/guide/history/index.html191
-rw-r--r--docs/en/erlang.mk/1/guide/index.html298
-rw-r--r--docs/en/erlang.mk/1/guide/installation.asciidoc124
-rw-r--r--docs/en/erlang.mk/1/guide/installation/index.html256
-rw-r--r--docs/en/erlang.mk/1/guide/limitations.asciidoc46
-rw-r--r--docs/en/erlang.mk/1/guide/limitations/index.html179
-rw-r--r--docs/en/erlang.mk/1/guide/overview.asciidoc87
-rw-r--r--docs/en/erlang.mk/1/guide/overview/index.html224
-rw-r--r--docs/en/erlang.mk/1/guide/ports.asciidoc100
-rw-r--r--docs/en/erlang.mk/1/guide/ports/index.html288
-rw-r--r--docs/en/erlang.mk/1/guide/releases.asciidoc70
-rw-r--r--docs/en/erlang.mk/1/guide/releases/index.html221
-rw-r--r--docs/en/erlang.mk/1/guide/shell.asciidoc46
-rw-r--r--docs/en/erlang.mk/1/guide/shell/index.html193
-rw-r--r--docs/en/erlang.mk/1/guide/updating.asciidoc63
-rw-r--r--docs/en/erlang.mk/1/guide/updating/index.html198
-rw-r--r--docs/en/erlang.mk/1/guide/why.asciidoc81
-rw-r--r--docs/en/erlang.mk/1/guide/why/index.html216
-rw-r--r--docs/en/erlang.mk/1/guide/xref.asciidoc6
-rw-r--r--docs/en/erlang.mk/1/guide/xref/index.html137
-rw-r--r--docs/en/erlang.mk/1/index.html1
-rw-r--r--docs/en/erlang.mk/index.html1
-rw-r--r--docs/en/gun/1.0/guide/connect.asciidoc154
-rw-r--r--docs/en/gun/1.0/guide/connect/index.html302
-rw-r--r--docs/en/gun/1.0/guide/http.asciidoc362
-rw-r--r--docs/en/gun/1.0/guide/http/index.html515
-rw-r--r--docs/en/gun/1.0/guide/index.html172
-rw-r--r--docs/en/gun/1.0/guide/introduction.asciidoc28
-rw-r--r--docs/en/gun/1.0/guide/introduction/index.html168
-rw-r--r--docs/en/gun/1.0/guide/protocols.asciidoc119
-rw-r--r--docs/en/gun/1.0/guide/protocols/index.html395
-rw-r--r--docs/en/gun/1.0/guide/start.asciidoc67
-rw-r--r--docs/en/gun/1.0/guide/start/index.html216
-rw-r--r--docs/en/gun/1.0/guide/websocket.asciidoc112
-rw-r--r--docs/en/gun/1.0/guide/websocket/index.html259
-rw-r--r--docs/en/gun/1.0/index.html1
-rw-r--r--docs/en/gun/1.0/manual/gun/index.html1734
-rw-r--r--docs/en/gun/1.0/manual/gun_app/index.html168
-rw-r--r--docs/en/gun/1.0/manual/index.html152
-rw-r--r--docs/en/gun/index.html1
-rw-r--r--docs/en/index.html1
-rw-r--r--docs/en/ranch/1.2/guide/embedded.asciidoc48
-rw-r--r--docs/en/ranch/1.2/guide/embedded/index.html182
-rw-r--r--docs/en/ranch/1.2/guide/index.html182
-rw-r--r--docs/en/ranch/1.2/guide/internals.asciidoc94
-rw-r--r--docs/en/ranch/1.2/guide/internals/index.html227
-rw-r--r--docs/en/ranch/1.2/guide/introduction.asciidoc25
-rw-r--r--docs/en/ranch/1.2/guide/introduction/index.html166
-rw-r--r--docs/en/ranch/1.2/guide/listeners.asciidoc251
-rw-r--r--docs/en/ranch/1.2/guide/listeners/index.html421
-rw-r--r--docs/en/ranch/1.2/guide/parsers.asciidoc92
-rw-r--r--docs/en/ranch/1.2/guide/parsers/index.html243
-rw-r--r--docs/en/ranch/1.2/guide/protocols.asciidoc125
-rw-r--r--docs/en/ranch/1.2/guide/protocols/index.html263
-rw-r--r--docs/en/ranch/1.2/guide/ssl_auth.asciidoc120
-rw-r--r--docs/en/ranch/1.2/guide/ssl_auth/index.html292
-rw-r--r--docs/en/ranch/1.2/guide/transports.asciidoc169
-rw-r--r--docs/en/ranch/1.2/guide/transports/index.html323
-rw-r--r--docs/en/ranch/1.2/index.html1
-rw-r--r--docs/en/ranch/1.2/manual/index.html172
-rw-r--r--docs/en/ranch/1.2/manual/ranch/index.html557
-rw-r--r--docs/en/ranch/1.2/manual/ranch_app/index.html177
-rw-r--r--docs/en/ranch/1.2/manual/ranch_protocol/index.html217
-rw-r--r--docs/en/ranch/1.2/manual/ranch_ssl/index.html483
-rw-r--r--docs/en/ranch/1.2/manual/ranch_tcp/index.html408
-rw-r--r--docs/en/ranch/1.2/manual/ranch_transport/index.html628
-rw-r--r--docs/en/ranch/index.html1
-rw-r--r--docs/index.html203
-rw-r--r--docs/index.xml2001
253 files changed, 74036 insertions, 0 deletions
diff --git a/docs/db.json b/docs/db.json
new file mode 100644
index 00000000..368e78f0
--- /dev/null
+++ b/docs/db.json
@@ -0,0 +1 @@
+[{"n":"cowboy_static:extra_mimetypes","l":"/docs/en/cowboy/1.0/manual/cowboy_static/index.html#extra_mimetypes"},{"n":"cowboy_static:extra","l":"/docs/en/cowboy/1.0/manual/cowboy_static/index.html#extra"},{"n":"cowboy_static:opts","l":"/docs/en/cowboy/1.0/manual/cowboy_static/index.html#opts"},{"n":"cowboy_static:extra_etag","l":"/docs/en/cowboy/1.0/manual/cowboy_static/index.html#extra_etag"},{"n":"http_status_codes:304 Not Modified","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#304 not modified"},{"n":"http_status_codes:500 Internal Server Error","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#500 internal server error"},{"n":"http_status_codes:201 Created","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#201 created"},{"n":"http_status_codes:413 Request Entity Too Large","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#413 request entity too large"},{"n":"http_status_codes:300 Multiple Choices","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#300 multiple choices"},{"n":"http_status_codes:412 Precondition Failed","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#412 precondition failed"},{"n":"http_status_codes:200 OK","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#200 ok"},{"n":"http_status_codes:101 Switching Protocols","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#101 switching protocols"},{"n":"http_status_codes:501 Not Implemented","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#501 not implemented"},{"n":"http_status_codes:505 HTTP Version Not Supported","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#505 http version not supported"},{"n":"http_status_codes:204 No Content","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#204 no content"},{"n":"http_status_codes:406 Not Acceptable","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#406 not acceptable"},{"n":"http_status_codes:415 Unsupported Media Type","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#415 unsupported media type"},{"n":"http_status_codes:503 Service Unavailable","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#503 service unavailable"},{"n":"http_status_codes:410 Gone","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#410 gone"},{"n":"http_status_codes:400 Bad Request","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#400 bad request"},{"n":"http_status_codes:401 Unauthorized","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#401 unauthorized"},{"n":"http_status_codes:301 Moved Permanently","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#301 moved permanently"},{"n":"http_status_codes:100 Continue","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#100 continue"},{"n":"http_status_codes:414 Request-URI Too Long","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#414 request-uri too long"},{"n":"http_status_codes:307 Temporary Redirect","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#307 temporary redirect"},{"n":"http_status_codes:409 Conflict","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#409 conflict"},{"n":"http_status_codes:202 Accepted","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#202 accepted"},{"n":"http_status_codes:404 Not Found","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#404 not found"},{"n":"http_status_codes:303 See Other","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#303 see other"},{"n":"http_status_codes:405 Method Not Allowed","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#405 method not allowed"},{"n":"http_status_codes:403 Forbidden","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#403 forbidden"},{"n":"http_status_codes:408 Request Timeout","l":"/docs/en/cowboy/1.0/manual/http_status_codes/index.html#408 request timeout"},{"n":"cowboy:http_version","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#http_version"},{"n":"cowboy:http_status","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#http_status"},{"n":"cowboy:onrequest_fun","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#onrequest_fun"},{"n":"cowboy:onresponse_fun","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#onresponse_fun"},{"n":"cowboy:start_http","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#start_http"},{"n":"cowboy:http_headers","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#http_headers"},{"n":"cowboy:start_https","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#start_https"},{"n":"cowboy:start_spdy","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#start_spdy"},{"n":"cowboy:stop_listener","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#stop_listener"},{"n":"cowboy:set_env","l":"/docs/en/cowboy/1.0/manual/cowboy/index.html#set_env"},{"n":"cowboy_http_handler:handle","l":"/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html#handle"},{"n":"cowboy_http_handler:init","l":"/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html#init"},{"n":"cowboy_http_handler:terminate","l":"/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html#terminate"},{"n":"cowboy_loop_handler:info","l":"/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html#info"},{"n":"cowboy_loop_handler:init","l":"/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html#init"},{"n":"cowboy_loop_handler:terminate","l":"/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html#terminate"},{"n":"cowboy_middleware:env","l":"/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html#env"},{"n":"cowboy_middleware:execute","l":"/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html#execute"},{"n":"cowboy_protocol:max_header_name_length ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_header_name_length "},{"n":"cowboy_protocol:max_keepalive ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_keepalive "},{"n":"cowboy_protocol:max_request_line_length ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_request_line_length "},{"n":"cowboy_protocol:middlewares ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#middlewares "},{"n":"cowboy_protocol:onresponse ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#onresponse "},{"n":"cowboy_protocol:timeout ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#timeout "},{"n":"cowboy_protocol:max_header_value_length ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_header_value_length "},{"n":"cowboy_protocol:max_headers ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_headers "},{"n":"cowboy_protocol:max_empty_lines ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#max_empty_lines "},{"n":"cowboy_protocol:compress ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#compress "},{"n":"cowboy_protocol:onrequest ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#onrequest "},{"n":"cowboy_protocol:env ","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#env "},{"n":"cowboy_protocol:opts","l":"/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html#opts"},{"n":"cowboy_req:has_resp_body","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#has_resp_body"},{"n":"cowboy_req:body_length","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#body_length"},{"n":"cowboy_req:headers","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#headers"},{"n":"cowboy_req:chunk","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#chunk"},{"n":"cowboy_req:parse_header","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#parse_header"},{"n":"cowboy_req:req","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#req"},{"n":"cowboy_req:cookie","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#cookie"},{"n":"cowboy_req:reply","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#reply"},{"n":"cowboy_req:method","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#method"},{"n":"cowboy_req:body_qs","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#body_qs"},{"n":"cowboy_req:set_resp_cookie","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#set_resp_cookie"},{"n":"cowboy_req:set_resp_header","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#set_resp_header"},{"n":"cowboy_req:port","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#port"},{"n":"cowboy_req:peer","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#peer"},{"n":"cowboy_req:part","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#part"},{"n":"cowboy_req:meta","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#meta"},{"n":"cowboy_req:continue","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#continue"},{"n":"cowboy_req:delete_resp_header","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#delete_resp_header"},{"n":"cowboy_req:set_meta","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#set_meta"},{"n":"cowboy_req:chunked_reply","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#chunked_reply"},{"n":"cowboy_req:host","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#host"},{"n":"cowboy_req:host_url","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#host_url"},{"n":"cowboy_req:qs_val","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#qs_val"},{"n":"cowboy_req:body","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#body"},{"n":"cowboy_req:cookies","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#cookies"},{"n":"cowboy_req:host_info","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#host_info"},{"n":"cowboy_req:cookie_opts","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#cookie_opts"},{"n":"cowboy_req:version","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#version"},{"n":"cowboy_req:qs","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#qs"},{"n":"cowboy_req:body_opts","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#body_opts"},{"n":"cowboy_req:bindings","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#bindings"},{"n":"cowboy_req:header","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#header"},{"n":"cowboy_req:binding","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#binding"},{"n":"cowboy_req:path_info","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#path_info"},{"n":"cowboy_req:compact","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#compact"},{"n":"cowboy_req:has_body","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#has_body"},{"n":"cowboy_req:path","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#path"},{"n":"cowboy_req:set_resp_body","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#set_resp_body"},{"n":"cowboy_req:has_resp_header","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#has_resp_header"},{"n":"cowboy_req:url","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#url"},{"n":"cowboy_req:qs_vals","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#qs_vals"},{"n":"cowboy_req:set_resp_body_fun","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#set_resp_body_fun"},{"n":"cowboy_req:part_body","l":"/docs/en/cowboy/1.0/manual/cowboy_req/index.html#part_body"},{"n":"cowboy_rest:valid_content_headers","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#valid_content_headers"},{"n":"cowboy_rest:generate_etag","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#generate_etag"},{"n":"cowboy_rest:forbidden","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#forbidden"},{"n":"cowboy_rest:valid_entity_length","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#valid_entity_length"},{"n":"cowboy_rest:expires","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#expires"},{"n":"cowboy_rest:resource_exists","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#resource_exists"},{"n":"cowboy_rest:last_modified","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#last_modified"},{"n":"cowboy_rest:delete_completed","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#delete_completed"},{"n":"cowboy_rest:is_conflict","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#is_conflict"},{"n":"cowboy_rest:moved_permanently","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#moved_permanently"},{"n":"cowboy_rest:media_type","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#media_type"},{"n":"cowboy_rest:charsets_provided","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#charsets_provided"},{"n":"cowboy_rest:content_types_provided","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#content_types_provided"},{"n":"cowboy_rest:content_types_accepted","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#content_types_accepted"},{"n":"cowboy_rest:previously_existed","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#previously_existed"},{"n":"cowboy_rest:languages_provided","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#languages_provided"},{"n":"cowboy_rest:uri_too_long","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#uri_too_long"},{"n":"cowboy_rest:moved_temporarily","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#moved_temporarily"},{"n":"cowboy_rest:charset","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#charset"},{"n":"cowboy_rest:rest_init","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#rest_init"},{"n":"cowboy_rest:rest_terminate","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#rest_terminate"},{"n":"cowboy_rest:known_content_type","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#known_content_type"},{"n":"cowboy_rest:allow_missing_post","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#allow_missing_post"},{"n":"cowboy_rest:options","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#options"},{"n":"cowboy_rest:multiple_choices","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#multiple_choices"},{"n":"cowboy_rest:language","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#language"},{"n":"cowboy_rest:allowed_methods","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#allowed_methods"},{"n":"cowboy_rest:malformed_request","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#malformed_request"},{"n":"cowboy_rest:known_methods","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#known_methods"},{"n":"cowboy_rest:Callback","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#callback"},{"n":"cowboy_rest:delete_resource","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#delete_resource"},{"n":"cowboy_rest:service_available","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#service_available"},{"n":"cowboy_rest:is_authorized","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#is_authorized"},{"n":"cowboy_rest:variances","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#variances"},{"n":"cowboy_rest:init","l":"/docs/en/cowboy/1.0/manual/cowboy_rest/index.html#init"},{"n":"cowboy_router:constraints","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#constraints"},{"n":"cowboy_router:routes","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#routes"},{"n":"cowboy_router:tokens","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#tokens"},{"n":"cowboy_router:bindings","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#bindings"},{"n":"cowboy_router:compile","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#compile"},{"n":"cowboy_router:dispatch_rules","l":"/docs/en/cowboy/1.0/manual/cowboy_router/index.html#dispatch_rules"},{"n":"cowboy_spdy:middlewares ","l":"/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html#middlewares "},{"n":"cowboy_spdy:onresponse ","l":"/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html#onresponse "},{"n":"cowboy_spdy:onrequest ","l":"/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html#onrequest "},{"n":"cowboy_spdy:opts","l":"/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html#opts"},{"n":"cowboy_spdy:env ","l":"/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html#env "},{"n":"cowboy_sub_protocol:upgrade","l":"/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html#upgrade"},{"n":"cowboy_websocket:websocket_compress","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html#websocket_compress"},{"n":"cowboy_websocket:websocket_version","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html#websocket_version"},{"n":"cowboy_websocket:close_code","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html#close_code"},{"n":"cowboy_websocket:frame","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html#frame"},{"n":"cowboy_websocket_handler:websocket_info","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html#websocket_info"},{"n":"cowboy_websocket_handler:websocket_terminate","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html#websocket_terminate"},{"n":"cowboy_websocket_handler:websocket_handle","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html#websocket_handle"},{"n":"cowboy_websocket_handler:init","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html#init"},{"n":"cowboy_websocket_handler:websocket_init","l":"/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html#websocket_init"},{"n":"cowboy_static:extra_mimetypes","l":"/docs/en/cowboy/HEAD/manual/cowboy_static/index.html#extra_mimetypes"},{"n":"cowboy_static:extra","l":"/docs/en/cowboy/HEAD/manual/cowboy_static/index.html#extra"},{"n":"cowboy_static:opts","l":"/docs/en/cowboy/HEAD/manual/cowboy_static/index.html#opts"},{"n":"cowboy_static:extra_etag","l":"/docs/en/cowboy/HEAD/manual/cowboy_static/index.html#extra_etag"},{"n":"http_status_codes:304 Not Modified","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#304 not modified"},{"n":"http_status_codes:500 Internal Server Error","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#500 internal server error"},{"n":"http_status_codes:201 Created","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#201 created"},{"n":"http_status_codes:413 Request Entity Too Large","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#413 request entity too large"},{"n":"http_status_codes:300 Multiple Choices","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#300 multiple choices"},{"n":"http_status_codes:412 Precondition Failed","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#412 precondition failed"},{"n":"http_status_codes:200 OK","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#200 ok"},{"n":"http_status_codes:101 Switching Protocols","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#101 switching protocols"},{"n":"http_status_codes:501 Not Implemented","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#501 not implemented"},{"n":"http_status_codes:505 HTTP Version Not Supported","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#505 http version not supported"},{"n":"http_status_codes:204 No Content","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#204 no content"},{"n":"http_status_codes:406 Not Acceptable","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#406 not acceptable"},{"n":"http_status_codes:415 Unsupported Media Type","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#415 unsupported media type"},{"n":"http_status_codes:503 Service Unavailable","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#503 service unavailable"},{"n":"http_status_codes:410 Gone","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#410 gone"},{"n":"http_status_codes:400 Bad Request","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#400 bad request"},{"n":"http_status_codes:401 Unauthorized","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#401 unauthorized"},{"n":"http_status_codes:301 Moved Permanently","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#301 moved permanently"},{"n":"http_status_codes:100 Continue","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#100 continue"},{"n":"http_status_codes:414 Request-URI Too Long","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#414 request-uri too long"},{"n":"http_status_codes:307 Temporary Redirect","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#307 temporary redirect"},{"n":"http_status_codes:409 Conflict","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#409 conflict"},{"n":"http_status_codes:202 Accepted","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#202 accepted"},{"n":"http_status_codes:404 Not Found","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#404 not found"},{"n":"http_status_codes:303 See Other","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#303 see other"},{"n":"http_status_codes:405 Method Not Allowed","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#405 method not allowed"},{"n":"http_status_codes:403 Forbidden","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#403 forbidden"},{"n":"http_status_codes:408 Request Timeout","l":"/docs/en/cowboy/HEAD/manual/http_status_codes/index.html#408 request timeout"},{"n":"cowboy:http_version","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#http_version"},{"n":"cowboy:fields","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#fields"},{"n":"cowboy:http_status","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#http_status"},{"n":"cowboy:onresponse_fun","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#onresponse_fun"},{"n":"cowboy:start_http","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#start_http"},{"n":"cowboy:http_headers","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#http_headers"},{"n":"cowboy:start_https","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#start_https"},{"n":"cowboy:start_spdy","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#start_spdy"},{"n":"cowboy:stop_listener","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#stop_listener"},{"n":"cowboy:set_env","l":"/docs/en/cowboy/HEAD/manual/cowboy/index.html#set_env"},{"n":"cowboy_handler:{crash, Class, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_handler/index.html#{crash, class, reason}"},{"n":"cowboy_handler:normal","l":"/docs/en/cowboy/HEAD/manual/cowboy_handler/index.html#normal"},{"n":"cowboy_handler:init","l":"/docs/en/cowboy/HEAD/manual/cowboy_handler/index.html#init"},{"n":"cowboy_handler:terminate","l":"/docs/en/cowboy/HEAD/manual/cowboy_handler/index.html#terminate"},{"n":"cowboy_loop:{error, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#{error, reason}"},{"n":"cowboy_loop:stop","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#stop"},{"n":"cowboy_loop:timeout","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#timeout"},{"n":"cowboy_loop:{crash, Class, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#{crash, class, reason}"},{"n":"cowboy_loop:{error, closed}","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#{error, closed}"},{"n":"cowboy_loop:info","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#info"},{"n":"cowboy_loop:{error, overflow}","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#{error, overflow}"},{"n":"cowboy_loop:normal","l":"/docs/en/cowboy/HEAD/manual/cowboy_loop/index.html#normal"},{"n":"cowboy_middleware:env","l":"/docs/en/cowboy/HEAD/manual/cowboy_middleware/index.html#env"},{"n":"cowboy_middleware:execute","l":"/docs/en/cowboy/HEAD/manual/cowboy_middleware/index.html#execute"},{"n":"cowboy_protocol:max_header_name_length ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_header_name_length "},{"n":"cowboy_protocol:max_keepalive ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_keepalive "},{"n":"cowboy_protocol:max_request_line_length ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_request_line_length "},{"n":"cowboy_protocol:middlewares ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#middlewares "},{"n":"cowboy_protocol:onresponse ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#onresponse "},{"n":"cowboy_protocol:timeout ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#timeout "},{"n":"cowboy_protocol:max_header_value_length ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_header_value_length "},{"n":"cowboy_protocol:max_headers ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_headers "},{"n":"cowboy_protocol:max_empty_lines ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#max_empty_lines "},{"n":"cowboy_protocol:compress ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#compress "},{"n":"cowboy_protocol:env ","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#env "},{"n":"cowboy_protocol:opts","l":"/docs/en/cowboy/HEAD/manual/cowboy_protocol/index.html#opts"},{"n":"cowboy_req:has_resp_body","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#has_resp_body"},{"n":"cowboy_req:body_length","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#body_length"},{"n":"cowboy_req:headers","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#headers"},{"n":"cowboy_req:chunk","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#chunk"},{"n":"cowboy_req:parse_header","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#parse_header"},{"n":"cowboy_req:req","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#req"},{"n":"cowboy_req:match_qs","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#match_qs"},{"n":"cowboy_req:reply","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#reply"},{"n":"cowboy_req:method","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#method"},{"n":"cowboy_req:parse_cookies","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#parse_cookies"},{"n":"cowboy_req:body_qs","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#body_qs"},{"n":"cowboy_req:parse_qs","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#parse_qs"},{"n":"cowboy_req:set_resp_cookie","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#set_resp_cookie"},{"n":"cowboy_req:set_resp_header","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#set_resp_header"},{"n":"cowboy_req:port","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#port"},{"n":"cowboy_req:peer","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#peer"},{"n":"cowboy_req:part","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#part"},{"n":"cowboy_req:meta","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#meta"},{"n":"cowboy_req:continue","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#continue"},{"n":"cowboy_req:delete_resp_header","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#delete_resp_header"},{"n":"cowboy_req:set_meta","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#set_meta"},{"n":"cowboy_req:chunked_reply","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#chunked_reply"},{"n":"cowboy_req:host","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#host"},{"n":"cowboy_req:host_url","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#host_url"},{"n":"cowboy_req:body","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#body"},{"n":"cowboy_req:host_info","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#host_info"},{"n":"cowboy_req:cookie_opts","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#cookie_opts"},{"n":"cowboy_req:version","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#version"},{"n":"cowboy_req:qs","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#qs"},{"n":"cowboy_req:body_opts","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#body_opts"},{"n":"cowboy_req:bindings","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#bindings"},{"n":"cowboy_req:header","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#header"},{"n":"cowboy_req:binding","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#binding"},{"n":"cowboy_req:match_cookies","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#match_cookies"},{"n":"cowboy_req:path_info","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#path_info"},{"n":"cowboy_req:has_body","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#has_body"},{"n":"cowboy_req:path","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#path"},{"n":"cowboy_req:set_resp_body","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#set_resp_body"},{"n":"cowboy_req:has_resp_header","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#has_resp_header"},{"n":"cowboy_req:url","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#url"},{"n":"cowboy_req:set_resp_body_fun","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#set_resp_body_fun"},{"n":"cowboy_req:part_body","l":"/docs/en/cowboy/HEAD/manual/cowboy_req/index.html#part_body"},{"n":"cowboy_rest:valid_content_headers","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#valid_content_headers"},{"n":"cowboy_rest:generate_etag","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#generate_etag"},{"n":"cowboy_rest:forbidden","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#forbidden"},{"n":"cowboy_rest:valid_entity_length","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#valid_entity_length"},{"n":"cowboy_rest:resource_exists","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#resource_exists"},{"n":"cowboy_rest:expires","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#expires"},{"n":"cowboy_rest:last_modified","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#last_modified"},{"n":"cowboy_rest:{crash, Class, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#{crash, class, reason}"},{"n":"cowboy_rest:delete_completed","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#delete_completed"},{"n":"cowboy_rest:is_conflict","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#is_conflict"},{"n":"cowboy_rest:moved_permanently","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#moved_permanently"},{"n":"cowboy_rest:media_type","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#media_type"},{"n":"cowboy_rest:charsets_provided","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#charsets_provided"},{"n":"cowboy_rest:content_types_accepted","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#content_types_accepted"},{"n":"cowboy_rest:content_types_provided","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#content_types_provided"},{"n":"cowboy_rest:normal","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#normal"},{"n":"cowboy_rest:previously_existed","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#previously_existed"},{"n":"cowboy_rest:languages_provided","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#languages_provided"},{"n":"cowboy_rest:uri_too_long","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#uri_too_long"},{"n":"cowboy_rest:moved_temporarily","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#moved_temporarily"},{"n":"cowboy_rest:charset","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#charset"},{"n":"cowboy_rest:allow_missing_post","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#allow_missing_post"},{"n":"cowboy_rest:options","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#options"},{"n":"cowboy_rest:multiple_choices","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#multiple_choices"},{"n":"cowboy_rest:language","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#language"},{"n":"cowboy_rest:allowed_methods","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#allowed_methods"},{"n":"cowboy_rest:malformed_request","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#malformed_request"},{"n":"cowboy_rest:known_methods","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#known_methods"},{"n":"cowboy_rest:Callback","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#callback"},{"n":"cowboy_rest:delete_resource","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#delete_resource"},{"n":"cowboy_rest:service_available","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#service_available"},{"n":"cowboy_rest:is_authorized","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#is_authorized"},{"n":"cowboy_rest:variances","l":"/docs/en/cowboy/HEAD/manual/cowboy_rest/index.html#variances"},{"n":"cowboy_router:routes","l":"/docs/en/cowboy/HEAD/manual/cowboy_router/index.html#routes"},{"n":"cowboy_router:tokens","l":"/docs/en/cowboy/HEAD/manual/cowboy_router/index.html#tokens"},{"n":"cowboy_router:bindings","l":"/docs/en/cowboy/HEAD/manual/cowboy_router/index.html#bindings"},{"n":"cowboy_router:compile","l":"/docs/en/cowboy/HEAD/manual/cowboy_router/index.html#compile"},{"n":"cowboy_router:dispatch_rules","l":"/docs/en/cowboy/HEAD/manual/cowboy_router/index.html#dispatch_rules"},{"n":"cowboy_spdy:middlewares ","l":"/docs/en/cowboy/HEAD/manual/cowboy_spdy/index.html#middlewares "},{"n":"cowboy_spdy:onresponse ","l":"/docs/en/cowboy/HEAD/manual/cowboy_spdy/index.html#onresponse "},{"n":"cowboy_spdy:opts","l":"/docs/en/cowboy/HEAD/manual/cowboy_spdy/index.html#opts"},{"n":"cowboy_spdy:env ","l":"/docs/en/cowboy/HEAD/manual/cowboy_spdy/index.html#env "},{"n":"cowboy_sub_protocol:upgrade","l":"/docs/en/cowboy/HEAD/manual/cowboy_sub_protocol/index.html#upgrade"},{"n":"cowboy_websocket:{remote, Code, Payload}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{remote, code, payload}"},{"n":"cowboy_websocket:{error, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{error, reason}"},{"n":"cowboy_websocket:stop","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#stop"},{"n":"cowboy_websocket:timeout","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#timeout"},{"n":"cowboy_websocket:{crash, Class, Reason}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{crash, class, reason}"},{"n":"cowboy_websocket:websocket_compress","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#websocket_compress"},{"n":"cowboy_websocket:{error, closed}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{error, closed}"},{"n":"cowboy_websocket:websocket_info","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#websocket_info"},{"n":"cowboy_websocket:{error, badframe}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{error, badframe}"},{"n":"cowboy_websocket:websocket_version","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#websocket_version"},{"n":"cowboy_websocket:remote","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#remote"},{"n":"cowboy_websocket:normal","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#normal"},{"n":"cowboy_websocket:websocket_handle","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#websocket_handle"},{"n":"cowboy_websocket:{error, badencoding}","l":"/docs/en/cowboy/HEAD/manual/cowboy_websocket/index.html#{error, badencoding}"},{"n":"ranch:start_listener","l":"/docs/en/ranch/1.1/manual/ranch/index.html#start_listener"},{"n":"ranch:set_protocol_options","l":"/docs/en/ranch/1.1/manual/ranch/index.html#set_protocol_options"},{"n":"ranch:set_max_connections","l":"/docs/en/ranch/1.1/manual/ranch/index.html#set_max_connections"},{"n":"ranch:get_protocol_options","l":"/docs/en/ranch/1.1/manual/ranch/index.html#get_protocol_options"},{"n":"ranch:accept_ack","l":"/docs/en/ranch/1.1/manual/ranch/index.html#accept_ack"},{"n":"ranch:remove_connection","l":"/docs/en/ranch/1.1/manual/ranch/index.html#remove_connection"},{"n":"ranch:max_conns","l":"/docs/en/ranch/1.1/manual/ranch/index.html#max_conns"},{"n":"ranch:child_spec","l":"/docs/en/ranch/1.1/manual/ranch/index.html#child_spec"},{"n":"ranch:ref","l":"/docs/en/ranch/1.1/manual/ranch/index.html#ref"},{"n":"ranch:get_max_connections","l":"/docs/en/ranch/1.1/manual/ranch/index.html#get_max_connections"},{"n":"ranch:get_port","l":"/docs/en/ranch/1.1/manual/ranch/index.html#get_port"},{"n":"ranch:stop_listener","l":"/docs/en/ranch/1.1/manual/ranch/index.html#stop_listener"},{"n":"ranch_protocol:start_link","l":"/docs/en/ranch/1.1/manual/ranch_protocol/index.html#start_link"},{"n":"ranch_ssl:opts","l":"/docs/en/ranch/1.1/manual/ranch_ssl/index.html#opts"},{"n":"ranch_tcp:opts","l":"/docs/en/ranch/1.1/manual/ranch_tcp/index.html#opts"},{"n":"ranch_transport:accept_ack","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#accept_ack"},{"n":"ranch_transport:controlling_process","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#controlling_process"},{"n":"ranch_transport:shutdown","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#shutdown"},{"n":"ranch_transport:sendfile_opts","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#sendfile_opts"},{"n":"ranch_transport:sendfile","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#sendfile"},{"n":"ranch_transport:send","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#send"},{"n":"ranch_transport:accept","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#accept"},{"n":"ranch_transport:recv","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#recv"},{"n":"ranch_transport:name","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#name"},{"n":"ranch_transport:close","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#close"},{"n":"ranch_transport:listen","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#listen"},{"n":"ranch_transport:setopts","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#setopts"},{"n":"ranch_transport:peername","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#peername"},{"n":"ranch_transport:messages","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#messages"},{"n":"ranch_transport:sockname","l":"/docs/en/ranch/1.1/manual/ranch_transport/index.html#sockname"},{"n":"ranch:start_listener","l":"/docs/en/ranch/1.0/manual/ranch/index.html#start_listener"},{"n":"ranch:set_protocol_options","l":"/docs/en/ranch/1.0/manual/ranch/index.html#set_protocol_options"},{"n":"ranch:set_max_connections","l":"/docs/en/ranch/1.0/manual/ranch/index.html#set_max_connections"},{"n":"ranch:get_protocol_options","l":"/docs/en/ranch/1.0/manual/ranch/index.html#get_protocol_options"},{"n":"ranch:accept_ack","l":"/docs/en/ranch/1.0/manual/ranch/index.html#accept_ack"},{"n":"ranch:remove_connection","l":"/docs/en/ranch/1.0/manual/ranch/index.html#remove_connection"},{"n":"ranch:max_conns","l":"/docs/en/ranch/1.0/manual/ranch/index.html#max_conns"},{"n":"ranch:child_spec","l":"/docs/en/ranch/1.0/manual/ranch/index.html#child_spec"},{"n":"ranch:ref","l":"/docs/en/ranch/1.0/manual/ranch/index.html#ref"},{"n":"ranch:get_max_connections","l":"/docs/en/ranch/1.0/manual/ranch/index.html#get_max_connections"},{"n":"ranch:get_port","l":"/docs/en/ranch/1.0/manual/ranch/index.html#get_port"},{"n":"ranch:stop_listener","l":"/docs/en/ranch/1.0/manual/ranch/index.html#stop_listener"},{"n":"ranch_protocol:start_link","l":"/docs/en/ranch/1.0/manual/ranch_protocol/index.html#start_link"},{"n":"ranch_ssl:opts","l":"/docs/en/ranch/1.0/manual/ranch_ssl/index.html#opts"},{"n":"ranch_tcp:opts","l":"/docs/en/ranch/1.0/manual/ranch_tcp/index.html#opts"},{"n":"ranch_transport:accept_ack","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#accept_ack"},{"n":"ranch_transport:controlling_process","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#controlling_process"},{"n":"ranch_transport:shutdown","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#shutdown"},{"n":"ranch_transport:sendfile_opts","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#sendfile_opts"},{"n":"ranch_transport:sendfile","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#sendfile"},{"n":"ranch_transport:send","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#send"},{"n":"ranch_transport:accept","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#accept"},{"n":"ranch_transport:recv","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#recv"},{"n":"ranch_transport:name","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#name"},{"n":"ranch_transport:close","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#close"},{"n":"ranch_transport:listen","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#listen"},{"n":"ranch_transport:setopts","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#setopts"},{"n":"ranch_transport:peername","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#peername"},{"n":"ranch_transport:messages","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#messages"},{"n":"ranch_transport:sockname","l":"/docs/en/ranch/1.0/manual/ranch_transport/index.html#sockname"},{"n":"ranch:start_listener","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#start_listener"},{"n":"ranch:set_protocol_options","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#set_protocol_options"},{"n":"ranch:set_max_connections","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#set_max_connections"},{"n":"ranch:get_protocol_options","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#get_protocol_options"},{"n":"ranch:accept_ack","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#accept_ack"},{"n":"ranch:remove_connection","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#remove_connection"},{"n":"ranch:max_conns","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#max_conns"},{"n":"ranch:child_spec","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#child_spec"},{"n":"ranch:ref","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#ref"},{"n":"ranch:get_max_connections","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#get_max_connections"},{"n":"ranch:get_port","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#get_port"},{"n":"ranch:stop_listener","l":"/docs/en/ranch/HEAD/manual/ranch/index.html#stop_listener"},{"n":"ranch_protocol:start_link","l":"/docs/en/ranch/HEAD/manual/ranch_protocol/index.html#start_link"},{"n":"ranch_ssl:opts","l":"/docs/en/ranch/HEAD/manual/ranch_ssl/index.html#opts"},{"n":"ranch_tcp:opts","l":"/docs/en/ranch/HEAD/manual/ranch_tcp/index.html#opts"},{"n":"ranch_transport:accept_ack","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#accept_ack"},{"n":"ranch_transport:controlling_process","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#controlling_process"},{"n":"ranch_transport:shutdown","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#shutdown"},{"n":"ranch_transport:sendfile_opts","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#sendfile_opts"},{"n":"ranch_transport:sendfile","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#sendfile"},{"n":"ranch_transport:send","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#send"},{"n":"ranch_transport:accept","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#accept"},{"n":"ranch_transport:recv","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#recv"},{"n":"ranch_transport:name","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#name"},{"n":"ranch_transport:close","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#close"},{"n":"ranch_transport:listen","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#listen"},{"n":"ranch_transport:setopts","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#setopts"},{"n":"ranch_transport:peername","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#peername"},{"n":"ranch_transport:messages","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#messages"},{"n":"ranch_transport:sockname","l":"/docs/en/ranch/HEAD/manual/ranch_transport/index.html#sockname"}] \ No newline at end of file
diff --git a/docs/en/cowboy/1.0/guide/architecture/index.html b/docs/en/cowboy/1.0/guide/architecture/index.html
new file mode 100644
index 00000000..ad14c180
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/broken_clients/index.html b/docs/en/cowboy/1.0/guide/broken_clients/index.html
new file mode 100644
index 00000000..d0046439
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/cookies/index.html b/docs/en/cowboy/1.0/guide/cookies/index.html
new file mode 100644
index 00000000..fd9e0519
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/erlang_beginners/index.html b/docs/en/cowboy/1.0/guide/erlang_beginners/index.html
new file mode 100644
index 00000000..b57aaf94
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/erlang_web/index.html b/docs/en/cowboy/1.0/guide/erlang_web/index.html
new file mode 100644
index 00000000..96ba79b1
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/getting_started/index.html b/docs/en/cowboy/1.0/guide/getting_started/index.html
new file mode 100644
index 00000000..810fd358
--- /dev/null
+++ b/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 &amp; 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
+...
+]]></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 &copy; 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/docs/en/cowboy/1.0/guide/hooks/index.html b/docs/en/cowboy/1.0/guide/hooks/index.html
new file mode 100644
index 00000000..13079057
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/http_handlers/index.html b/docs/en/cowboy/1.0/guide/http_handlers/index.html
new file mode 100644
index 00000000..31a6c135
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/http_req_life/index.html b/docs/en/cowboy/1.0/guide/http_req_life/index.html
new file mode 100644
index 00000000..90d5d466
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/http_req_resp.png b/docs/en/cowboy/1.0/guide/http_req_resp.png
new file mode 100644
index 00000000..e38935f3
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/http_req_resp.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/http_req_resp.svg b/docs/en/cowboy/1.0/guide/http_req_resp.svg
new file mode 100644
index 00000000..0cfa0ae9
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/index.html b/docs/en/cowboy/1.0/guide/index.html
new file mode 100644
index 00000000..f03e8f67
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/introduction/index.html b/docs/en/cowboy/1.0/guide/introduction/index.html
new file mode 100644
index 00000000..fa7f48f5
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/loop_handlers/index.html b/docs/en/cowboy/1.0/guide/loop_handlers/index.html
new file mode 100644
index 00000000..d9d1bb30
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/middlewares/index.html b/docs/en/cowboy/1.0/guide/middlewares/index.html
new file mode 100644
index 00000000..42410512
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/modern_web/index.html b/docs/en/cowboy/1.0/guide/modern_web/index.html
new file mode 100644
index 00000000..1aaba0a0
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/multipart_intro/index.html b/docs/en/cowboy/1.0/guide/multipart_intro/index.html
new file mode 100644
index 00000000..3a2f5273
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/multipart_req/index.html b/docs/en/cowboy/1.0/guide/multipart_req/index.html
new file mode 100644
index 00000000..f6301d83
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/req/index.html b/docs/en/cowboy/1.0/guide/req/index.html
new file mode 100644
index 00000000..0b8bb586
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/req_body/index.html b/docs/en/cowboy/1.0/guide/req_body/index.html
new file mode 100644
index 00000000..b6365a8f
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/resource_design/index.html b/docs/en/cowboy/1.0/guide/resource_design/index.html
new file mode 100644
index 00000000..24977abb
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/resp/index.html b/docs/en/cowboy/1.0/guide/resp/index.html
new file mode 100644
index 00000000..d61be41b
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/rest_cond.png b/docs/en/cowboy/1.0/guide/rest_cond.png
new file mode 100644
index 00000000..64cda347
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_cond.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_cond.svg b/docs/en/cowboy/1.0/guide/rest_cond.svg
new file mode 100644
index 00000000..542ae17d
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_conneg.png b/docs/en/cowboy/1.0/guide/rest_conneg.png
new file mode 100644
index 00000000..65ecdcf3
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_conneg.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_conneg.svg b/docs/en/cowboy/1.0/guide/rest_conneg.svg
new file mode 100644
index 00000000..247567a0
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_delete.png b/docs/en/cowboy/1.0/guide/rest_delete.png
new file mode 100644
index 00000000..56a861c0
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_delete.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_delete.svg b/docs/en/cowboy/1.0/guide/rest_delete.svg
new file mode 100644
index 00000000..2f5513cd
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_flowcharts/index.html b/docs/en/cowboy/1.0/guide/rest_flowcharts/index.html
new file mode 100644
index 00000000..24208561
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/rest_get_head.png b/docs/en/cowboy/1.0/guide/rest_get_head.png
new file mode 100644
index 00000000..efee892a
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_get_head.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_get_head.svg b/docs/en/cowboy/1.0/guide/rest_get_head.svg
new file mode 100644
index 00000000..c78e9399
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_handlers/index.html b/docs/en/cowboy/1.0/guide/rest_handlers/index.html
new file mode 100644
index 00000000..69f2b001
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/rest_options.png b/docs/en/cowboy/1.0/guide/rest_options.png
new file mode 100644
index 00000000..90fd6f06
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_options.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_options.svg b/docs/en/cowboy/1.0/guide/rest_options.svg
new file mode 100644
index 00000000..496c050c
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_principles/index.html b/docs/en/cowboy/1.0/guide/rest_principles/index.html
new file mode 100644
index 00000000..0be16d14
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/rest_put_post_patch.png b/docs/en/cowboy/1.0/guide/rest_put_post_patch.png
new file mode 100644
index 00000000..4afca9e9
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_put_post_patch.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_put_post_patch.svg b/docs/en/cowboy/1.0/guide/rest_put_post_patch.svg
new file mode 100644
index 00000000..263cc942
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/rest_start.png b/docs/en/cowboy/1.0/guide/rest_start.png
new file mode 100644
index 00000000..7f264642
--- /dev/null
+++ b/docs/en/cowboy/1.0/guide/rest_start.png
Binary files differ
diff --git a/docs/en/cowboy/1.0/guide/rest_start.svg b/docs/en/cowboy/1.0/guide/rest_start.svg
new file mode 100644
index 00000000..d75e1cc6
--- /dev/null
+++ b/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/docs/en/cowboy/1.0/guide/routing/index.html b/docs/en/cowboy/1.0/guide/routing/index.html
new file mode 100644
index 00000000..9f0923f0
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/static_handlers/index.html b/docs/en/cowboy/1.0/guide/static_handlers/index.html
new file mode 100644
index 00000000..98e9c833
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/upgrade_protocol/index.html b/docs/en/cowboy/1.0/guide/upgrade_protocol/index.html
new file mode 100644
index 00000000..41aa090e
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/ws_handlers/index.html b/docs/en/cowboy/1.0/guide/ws_handlers/index.html
new file mode 100644
index 00000000..e1d3d9a2
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/guide/ws_protocol/index.html b/docs/en/cowboy/1.0/guide/ws_protocol/index.html
new file mode 100644
index 00000000..05d2bdeb
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/index.html b/docs/en/cowboy/1.0/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/1.0/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/cowboy/1.0/manual/cowboy/index.html b/docs/en/cowboy/1.0/manual/cowboy/index.html
new file mode 100644
index 00000000..892103f5
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_app/index.html b/docs/en/cowboy/1.0/manual/cowboy_app/index.html
new file mode 100644
index 00000000..bd353e67
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_handler/index.html b/docs/en/cowboy/1.0/manual/cowboy_handler/index.html
new file mode 100644
index 00000000..8761e46d
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html b/docs/en/cowboy/1.0/manual/cowboy_http_handler/index.html
new file mode 100644
index 00000000..1791c88e
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html b/docs/en/cowboy/1.0/manual/cowboy_loop_handler/index.html
new file mode 100644
index 00000000..94fa6f32
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html b/docs/en/cowboy/1.0/manual/cowboy_middleware/index.html
new file mode 100644
index 00000000..5c9189f1
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html b/docs/en/cowboy/1.0/manual/cowboy_protocol/index.html
new file mode 100644
index 00000000..89e549c1
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_req/index.html b/docs/en/cowboy/1.0/manual/cowboy_req/index.html
new file mode 100644
index 00000000..b3e122d4
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_rest/index.html b/docs/en/cowboy/1.0/manual/cowboy_rest/index.html
new file mode 100644
index 00000000..31af54c0
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_router/index.html b/docs/en/cowboy/1.0/manual/cowboy_router/index.html
new file mode 100644
index 00000000..fd191650
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html b/docs/en/cowboy/1.0/manual/cowboy_spdy/index.html
new file mode 100644
index 00000000..39f0611c
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_static/index.html b/docs/en/cowboy/1.0/manual/cowboy_static/index.html
new file mode 100644
index 00000000..8d6dd8a5
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html b/docs/en/cowboy/1.0/manual/cowboy_sub_protocol/index.html
new file mode 100644
index 00000000..53b52bd4
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html b/docs/en/cowboy/1.0/manual/cowboy_websocket/index.html
new file mode 100644
index 00000000..e05e9829
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html b/docs/en/cowboy/1.0/manual/cowboy_websocket_handler/index.html
new file mode 100644
index 00000000..62ddd89a
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/http_status_codes/index.html b/docs/en/cowboy/1.0/manual/http_status_codes/index.html
new file mode 100644
index 00000000..d668474f
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/1.0/manual/index.html b/docs/en/cowboy/1.0/manual/index.html
new file mode 100644
index 00000000..b5b11489
--- /dev/null
+++ b/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 &amp; 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 &copy; 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/docs/en/cowboy/2.0/guide/architecture.asciidoc b/docs/en/cowboy/2.0/guide/architecture.asciidoc
new file mode 100644
index 00000000..416ef36b
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/architecture.asciidoc
@@ -0,0 +1,48 @@
+[[architecture]]
+== Architecture
+
+Cowboy is a lightweight HTTP server.
+
+It is built on top of Ranch. Please see the Ranch guide for more
+information.
+
+=== One process per connection
+
+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.
+
+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.
+
+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.
+
+=== Binaries
+
+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.
+
+=== Date header
+
+Because querying for the current date and time can be expensive,
+Cowboy generates one `Date` 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.
+
+=== Max connections
+
+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.
+
+Disabling this feature, by setting the `{max_connections, infinity}`
+protocol option, would give you greater performance when you are
+only processing short-lived requests.
diff --git a/docs/en/cowboy/2.0/guide/architecture/index.html b/docs/en/cowboy/2.0/guide/architecture/index.html
new file mode 100644
index 00000000..ef816699
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/architecture/index.html
@@ -0,0 +1,191 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Architecture</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Architecture</span></h1>
+
+<div class="paragraph"><p>Cowboy is a lightweight HTTP server.</p></div>
+<div class="paragraph"><p>It is built on top of Ranch. Please see the Ranch guide for more
+information.</p></div>
+<div class="sect1">
+<h2 id="_one_process_per_connection">One process per connection</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_binaries">Binaries</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_date_header">Date header</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_max_connections">Max connections</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/broken_clients.asciidoc b/docs/en/cowboy/2.0/guide/broken_clients.asciidoc
new file mode 100644
index 00000000..17bb892f
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/broken_clients.asciidoc
@@ -0,0 +1,61 @@
+[[broken_clients]]
+== Dealing with broken clients
+
+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.
+
+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.
+
+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.
+
+=== Lowercase headers
+
+Cowboy converts all headers it receives to lowercase, and
+similarly sends back headers all in lowercase. Some broken
+HTTP clients have issues with that.
+
+A simple way to solve this is to create an `onresponse` hook
+that will format the header names with the expected case.
+
+[source,erlang]
+----
+capitalize_hook(Status, Headers, Body, Req) ->
+ Headers2 = [{cowboy_bstr:capitalize_token(N), V}
+ || {N, V} <- Headers],
+ cowboy_req:reply(Status, Headers2, Body, Req).
+----
+
+Note that HTTP/2 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.
+
+=== Camel-case headers
+
+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 `cowboy_protocol` file
+directly.
+
+=== Chunked transfer-encoding
+
+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.
+
+A simple workaround exists in these cases. By changing the
+Req object response state to `waiting_stream`, Cowboy will
+understand that it must use the identity transfer-encoding
+when replying, just like if it was an HTTP/1.0 client.
+
+[source,erlang]
+Req2 = cowboy_req:set(resp_state, waiting_stream).
diff --git a/docs/en/cowboy/2.0/guide/broken_clients/index.html b/docs/en/cowboy/2.0/guide/broken_clients/index.html
new file mode 100644
index 00000000..049ee878
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/broken_clients/index.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Dealing with broken clients</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Dealing with broken clients</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>That means clients that ignore the HTTP standard completely
+may fail to understand Cowboy&#8217;s responses. There are of
+course workarounds. This chapter aims to cover them.</p></div>
+<div class="sect1">
+<h2 id="_lowercase_headers">Lowercase headers</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">capitalize_hook</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Headers2</span> <span style="color: #990000">=</span> [{<span style="font-weight: bold"><span style="color: #000000">cowboy_bstr:capitalize_token</span></span>(<span style="color: #009900">N</span>), <span style="color: #009900">V</span>}
+ || {<span style="color: #009900">N</span>, <span style="color: #009900">V</span>} <span style="color: #990000">&lt;-</span> <span style="color: #009900">Headers</span>],
+ <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #009900">Status</span>, <span style="color: #009900">Headers2</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that HTTP/2 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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_camel_case_headers">Camel-case headers</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_chunked_transfer_encoding">Chunked transfer-encoding</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set</span></span>(<span style="color: #FF6600">resp_state</span>, <span style="color: #FF6600">waiting_stream</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/constraints.asciidoc b/docs/en/cowboy/2.0/guide/constraints.asciidoc
new file mode 100644
index 00000000..0ae01d59
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/constraints.asciidoc
@@ -0,0 +1,54 @@
+[[constraints]]
+== Constraints
+
+Cowboy provides an optional constraints based validation feature
+when interacting with user input.
+
+Constraints are first used during routing. The router uses
+constraints to more accurately match bound values, allowing
+to create routes where a segment is an integer for example,
+and rejecting the others.
+
+Constraints are also used when performing a match operation
+on input data, like the query string or cookies. There, a
+default value can also be provided for optional values.
+
+Finally, constraints can be used to not only validate input,
+but also convert said input into proper Erlang terms, all in
+one step.
+
+=== Structure
+
+Constraints are provided as a list of fields and for each
+field a list of constraints for that field can be provided.
+
+Fields are either the name of the field; the name and
+one or more constraints; or the name, one or more constraints
+and a default value.
+
+When no default value is provided then the field is required.
+Otherwise the default value is used.
+
+All constraints for a field will be used to match its value
+in the order they are given. If the value is modified by a
+constraint, the next constraint receives the updated value.
+
+=== Built-in constraints
+
+[cols="<,<",options="header"]
+|===
+| Constraint | Description
+| int | Convert binary value to integer.
+| nonempty | Ensures the binary value is non-empty.
+|===
+
+=== Custom constraint
+
+In addition to the predefined constraints, Cowboy will accept
+a fun. This fun must accept one argument and return one of
+`true`, `{true, NewValue}` or `false`. The result indicates
+whether the value matches the constraint, and if it does it
+can optionally be modified. This allows converting the value
+to a more appropriate Erlang term.
+
+Note that constraint functions SHOULD be pure and MUST NOT crash.
diff --git a/docs/en/cowboy/2.0/guide/constraints/index.html b/docs/en/cowboy/2.0/guide/constraints/index.html
new file mode 100644
index 00000000..f9c072b6
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/constraints/index.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Constraints</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Constraints</span></h1>
+
+<div class="paragraph"><p>Cowboy provides an optional constraints based validation feature
+when interacting with user input.</p></div>
+<div class="paragraph"><p>Constraints are first used during routing. The router uses
+constraints to more accurately match bound values, allowing
+to create routes where a segment is an integer for example,
+and rejecting the others.</p></div>
+<div class="paragraph"><p>Constraints are also used when performing a match operation
+on input data, like the query string or cookies. There, a
+default value can also be provided for optional values.</p></div>
+<div class="paragraph"><p>Finally, constraints can be used to not only validate input,
+but also convert said input into proper Erlang terms, all in
+one step.</p></div>
+<div class="sect1">
+<h2 id="_structure">Structure</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Constraints are provided as a list of fields and for each
+field a list of constraints for that field can be provided.</p></div>
+<div class="paragraph"><p>Fields are either the name of the field; the name and
+one or more constraints; or the name, one or more constraints
+and a default value.</p></div>
+<div class="paragraph"><p>When no default value is provided then the field is required.
+Otherwise the default value is used.</p></div>
+<div class="paragraph"><p>All constraints for a field will be used to match its value
+in the order they are given. If the value is modified by a
+constraint, the next constraint receives the updated value.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_built_in_constraints">Built-in constraints</h2>
+<div class="sectionbody">
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Constraint </th>
+<th align="left" valign="top"> Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">int</p></td>
+<td align="left" valign="top"><p class="table">Convert binary value to integer.</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">nonempty</p></td>
+<td align="left" valign="top"><p class="table">Ensures the binary value is non-empty.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_custom_constraint">Custom constraint</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In addition to the predefined constraints, Cowboy will accept
+a fun. This fun must accept one argument and return one of
+<code>true</code>, <code>{true, NewValue}</code> or <code>false</code>. The result indicates
+whether the value matches the constraint, and if it does it
+can optionally be modified. This allows converting the value
+to a more appropriate Erlang term.</p></div>
+<div class="paragraph"><p>Note that constraint functions SHOULD be pure and MUST NOT crash.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/cookies.asciidoc b/docs/en/cowboy/2.0/guide/cookies.asciidoc
new file mode 100644
index 00000000..6068db37
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/cookies.asciidoc
@@ -0,0 +1,163 @@
+[[cookies]]
+== Using cookies
+
+Cookies are a mechanism allowing applications to maintain
+state on top of the stateless HTTP protocol.
+
+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.
+
+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.
+
+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.
+
+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.
+
+When the server sets cookies, they will only be available
+for requests that are sent after the client receives the
+response.
+
+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.
+
+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.
+
+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.
+
+Finally, cookies can be restricted to HTTP and HTTPS requests,
+essentially disabling their access from client-side scripts.
+
+=== Setting cookies
+
+By default, cookies you set are defined for the session.
+
+[source,erlang]
+SessionID = generate_session_id(),
+Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [], Req).
+
+You can also make them expire at a specific point in the
+future.
+
+[source,erlang]
+----
+SessionID = generate_session_id(),
+Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [
+ {max_age, 3600}
+], Req).
+----
+
+You can delete cookies that have already been set. The value
+is ignored.
+
+[source,erlang]
+----
+Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, <<>>, [
+ {max_age, 0}
+], Req).
+----
+
+You can restrict them to a specific domain and path.
+For example, the following cookie will be set for the domain
+`my.example.org` and all its subdomains, but only on the path
+`/account` and all its subdirectories.
+
+[source,erlang]
+----
+Req2 = cowboy_req:set_resp_cookie(<<"inaccount">>, <<"1">>, [
+ {domain, "my.example.org"},
+ {path, "/account"}
+], Req).
+----
+
+You can restrict the cookie to secure channels, typically HTTPS.
+
+[source,erlang]
+----
+SessionID = generate_session_id(),
+Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [
+ {secure, true}
+], Req).
+----
+
+You can restrict the cookie to client-server communication
+only. Such a cookie will not be available to client-side scripts.
+
+[source,erlang]
+----
+SessionID = generate_session_id(),
+Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [
+ {http_only, true}
+], Req).
+----
+
+Cookies may also be set client-side, for example using
+Javascript.
+
+=== Reading cookies
+
+As we said, the client sends cookies with every request.
+But unlike the server, the client only sends the cookie
+name and value.
+
+Cowboy provides two different ways to read cookies. You
+can either parse them as a list of key/value pairs, or
+match them into a map, optionally applying constraints
+to the values or providing a default if they are missing.
+
+You can parse the cookies and then use standard library
+functions to access individual values.
+
+[source,erlang]
+Cookies = cowboy_req:parse_cookies(Req),
+{_, Lang} = lists:keyfind(<<"lang">>, 1, Cookies).
+
+You can match the cookies into a map.
+
+[source,erlang]
+#{id := ID, lang := Lang} = cowboy_req:match_cookies([id, lang], Req).
+
+You can use constraints to validate the values while matching
+them. The following snippet will crash if the `id` cookie is
+not an integer number or if the `lang` cookie is empty. Additionally
+the `id` cookie value will be converted to an integer term, saving
+you a conversion step.
+
+[source,erlang]
+CookiesMap = cowboy_req:match_cookies([{id, int}, {lang, nonempty}], Req).
+
+Note that if two cookies share the same name, then the map value
+will be a list of the two cookie values.
+
+Read more about xref:constraints[constraints].
+
+A default value can be provided. The default will be used
+if the `lang` cookie is not found. It will not be used if
+the cookie is found but has an empty value.
+
+[source,erlang]
+#{lang := Lang} = cowboy_req:match_cookies([{lang, [], <<"en-US">>}], Req).
+
+If no default is provided and the value is missing, the
+query string is deemed invalid and the process will crash.
diff --git a/docs/en/cowboy/2.0/guide/cookies/index.html b/docs/en/cowboy/2.0/guide/cookies/index.html
new file mode 100644
index 00000000..4aea8eb0
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/cookies/index.html
@@ -0,0 +1,303 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Using cookies</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Using cookies</span></h1>
+
+<div class="paragraph"><p>Cookies are a mechanism allowing applications to maintain
+state on top of the stateless HTTP protocol.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>When the server sets cookies, they will only be available
+for requests that are sent after the client receives the
+response.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Finally, cookies can be restricted to HTTP and HTTPS requests,
+essentially disabling their access from client-side scripts.</p></div>
+<div class="sect1">
+<h2 id="_setting_cookies">Setting cookies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>By default, cookies you set are defined for the session.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, [], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also make them expire at a specific point in the
+future.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, [
+ {<span style="color: #FF6600">max_age</span>, <span style="color: #993399">3600</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can delete cookies that have already been set. The value
+is ignored.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>, [
+ {<span style="color: #FF6600">max_age</span>, <span style="color: #993399">0</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>, [
+ {<span style="color: #FF6600">domain</span>, <span style="color: #FF0000">"my.example.org"</span>},
+ {<span style="color: #FF6600">path</span>, <span style="color: #FF0000">"/account"</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can restrict the cookie to secure channels, typically HTTPS.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, [
+ {<span style="color: #FF6600">secure</span>, <span style="color: #000080">true</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can restrict the cookie to client-server communication
+only. Such a cookie will not be available to client-side scripts.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, [
+ {<span style="color: #FF6600">http_only</span>, <span style="color: #000080">true</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Cookies may also be set client-side, for example using
+Javascript.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_reading_cookies">Reading cookies</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Cowboy provides two different ways to read cookies. You
+can either parse them as a list of key/value pairs, or
+match them into a map, optionally applying constraints
+to the values or providing a default if they are missing.</p></div>
+<div class="paragraph"><p>You can parse the cookies and then use standard library
+functions to access individual values.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Cookies</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_cookies</span></span>(<span style="color: #009900">Req</span>),
+{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Cookies</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can match the cookies into a map.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can use constraints to validate the values while matching
+them. The following snippet will crash if the <code>id</code> cookie is
+not an integer number or if the <code>lang</code> cookie is empty. Additionally
+the <code>id</code> cookie value will be converted to an integer term, saving
+you a conversion step.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">CookiesMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that if two cookies share the same name, then the map value
+will be a list of the two cookie values.</p></div>
+<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
+<div class="paragraph"><p>A default value can be provided. The default will be used
+if the <code>lang</code> cookie is not found. It will not be used if
+the cookie is found but has an empty value.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_cookies</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If no default is provided and the value is missing, the
+query string is deemed invalid and the process will crash.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/erlang_beginners.asciidoc b/docs/en/cowboy/2.0/guide/erlang_beginners.asciidoc
new file mode 100644
index 00000000..b9a6c655
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/erlang_beginners.asciidoc
@@ -0,0 +1,36 @@
+[[erlang_beginners]]
+== Erlang for beginners
+
+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.
+
+We recommend two books for beginners. You should read them
+both at some point, as they cover Erlang from two entirely
+different perspectives.
+
+=== Learn You Some Erlang for Great Good!
+
+The quickest way to get started with Erlang is by reading
+a book with the funny name of http://learnyousomeerlang.com[LYSE],
+as we affectionately call it.
+
+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.
+
+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.
+
+=== Programming Erlang
+
+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 http://pragprog.com/book/jaerlang2/programming-erlang[Programming Erlang].
+
+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.
diff --git a/docs/en/cowboy/2.0/guide/erlang_beginners/index.html b/docs/en/cowboy/2.0/guide/erlang_beginners/index.html
new file mode 100644
index 00000000..4632dca9
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/erlang_beginners/index.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Erlang for beginners</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Erlang for beginners</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_learn_you_some_erlang_for_great_good">Learn You Some Erlang for Great Good!</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_programming_erlang">Programming Erlang</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/erlang_web.asciidoc b/docs/en/cowboy/2.0/guide/erlang_web.asciidoc
new file mode 100644
index 00000000..702e0437
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/erlang_web.asciidoc
@@ -0,0 +1,176 @@
+[[erlang_web]]
+== Erlang and the Web
+
+=== The Web is concurrent
+
+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.
+
+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.
+
+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.
+
+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!
+
+The Web is concurrent, and Erlang is a language designed
+for concurrency, so it is a perfect match.
+
+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.
+
+The Web has large userbases, and the Erlang platform was
+designed to work in a distributed setting, so it is a
+perfect match.
+
+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.
+
+Only Erlang is prepared to deal with what's coming.
+
+=== The Web is soft real time
+
+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.
+
+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.
+
+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.
+
+The Web is soft real time because taking longer to perform an
+operation would be seen as bad quality of service.
+
+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.
+
+Erlang provides the guarantees that the soft real time Web
+requires.
+
+=== The Web is asynchronous
+
+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.
+
+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.
+
+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.
+
+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.
+
+The more recent Web technologies, like Websocket of course, but also
+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.
+
+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.
+
+=== The Web is omnipresent
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+Erlang's fault tolerance oriented design is the first piece of
+what makes it the best choice for the omnipresent, always available
+Web.
+
+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.
+
+Fault tolerance and distribution are important today, and will be
+vital in the future of the Web. Erlang is ready.
+
+=== Erlang is the ideal platform for the Web
+
+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.
diff --git a/docs/en/cowboy/2.0/guide/erlang_web/index.html b/docs/en/cowboy/2.0/guide/erlang_web/index.html
new file mode 100644
index 00000000..8206392a
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/erlang_web/index.html
@@ -0,0 +1,300 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Erlang and the Web</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Erlang and the Web</span></h1>
+
+<div class="sect1">
+<h2 id="_the_web_is_concurrent">The Web is concurrent</h2>
+<div class="sectionbody">
+<div class="paragraph"><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&#8217;t much.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Even today a lot of systems used in production haven&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The Web is concurrent, and Erlang is a language designed
+for concurrency, so it is a perfect match.</p></div>
+<div class="paragraph"><p>Of course, various platforms need to scale beyond a few
+million connections. This is where Erlang&#8217;s built-in
+distribution mechanisms come in. If one server isn&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Or is it? Surely you can find solutions to handle that many
+concurrent connections with your favorite language&#8230; But all
+these solutions will break down in the next few years. Why?
+Firstly because servers don&#8217;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></div>
+<div class="paragraph"><p>Only Erlang is prepared to deal with what&#8217;s coming.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_web_is_soft_real_time">The Web is soft real time</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Users aren&#8217;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&#8217;ll start worrying about
+whether it successfully went through.</p></div>
+<div class="paragraph"><p>The Web is soft real time because taking longer to perform an
+operation would be seen as bad quality of service.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Erlang provides the guarantees that the soft real time Web
+requires.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_web_is_asynchronous">The Web is asynchronous</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The more recent Web technologies, like Websocket of course, but also
+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></div>
+<div class="paragraph"><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&#8217;s
+only natural that it&#8217;s so good at dealing with the asynchronous Web.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_web_is_omnipresent">The Web is omnipresent</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The Web has taken a very important part of our lives. We&#8217;re
+connected at all times, when we&#8217;re on our phone, using our computer,
+passing time using a tablet while in the bathroom&#8230; And this
+isn&#8217;t going to slow down, every single device at home or on us
+will be connected.</p></div>
+<div class="paragraph"><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&#8217;s having
+too many issues they just move on.</p></div>
+<div class="paragraph"><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&#8217;t been representative
+of reality in a long time, and are drifting further away as
+time goes on.</p></div>
+<div class="paragraph"><p>What developers should really ask themselves is "Can I service
+all my users with no interruption?" and they&#8217;d find that they have
+two choices. They can either hope for the best, or they can use
+Erlang.</p></div>
+<div class="paragraph"><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&#8217;re lucky, you won&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Erlang&#8217;s fault tolerance oriented design is the first piece of
+what makes it the best choice for the omnipresent, always available
+Web.</p></div>
+<div class="paragraph"><p>The second piece is Erlang&#8217;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></div>
+<div class="paragraph"><p>Fault tolerance and distribution are important today, and will be
+vital in the future of the Web. Erlang is ready.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_is_the_ideal_platform_for_the_web">Erlang is the ideal platform for the Web</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/getting_started.asciidoc b/docs/en/cowboy/2.0/guide/getting_started.asciidoc
new file mode 100644
index 00000000..679d9fe3
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/getting_started.asciidoc
@@ -0,0 +1,141 @@
+[[getting_started]]
+== Getting started
+
+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.
+
+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.
+
+=== Bootstrap
+
+We are going to use the https://github.com/ninenines/erlang.mk[Erlang.mk]
+build system. It also offers bootstrap features allowing us to
+quickly get started without having to deal with minute details.
+
+First, let's create the directory for our application.
+
+[source,bash]
+$ mkdir hello_erlang
+$ cd hello_erlang
+
+Then we need to download Erlang.mk. Either use the following
+command or download it manually.
+
+[source,bash]
+$ wget https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk
+
+We can now bootstrap our application. Since we are going to generate
+a release, we will also bootstrap it at the same time.
+
+[source,bash]
+$ make -f erlang.mk bootstrap bootstrap-rel
+
+This creates a Makefile, a base application, and the release files
+necessary for creating the release. We can already build and start
+this release.
+
+[source,bash]
+----
+$ make run
+...
+----
+
+Entering the command `i().` will show the running processes, including
+one called `hello_erlang_sup`. This is the supervisor for our
+application.
+
+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.
+
+=== Cowboy setup
+
+Modifying the 'Makefile' allows the build system to know it needs to
+fetch and compile Cowboy. To do that we simply need to add two lines
+to our Makefile to make it look like this:
+
+[source,make]
+----
+PROJECT = hello_erlang
+
+DEPS = cowboy
+dep_cowboy_commit = master
+
+include erlang.mk
+----
+
+If you run `make run` now, Cowboy will be included in the release
+and started automatically. This is not enough however, as Cowboy
+doesn't do anything by default. We still need to tell Cowboy to
+listen for connections.
+
+=== Listening for connections
+
+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.
+
+Open the 'src/hello_erlang_app.erl' file and add the necessary
+code to the `start/2` function to make it look like this:
+
+[source,erlang]
+----
+start(_Type, _Args) ->
+ Dispatch = cowboy_router:compile([
+ {'_', [{"/", hello_handler, []}]}
+ ]),
+ {ok, _} = cowboy:start_http(my_http_listener, 100, [{port, 8080}],
+ [{env, [{dispatch, Dispatch}]}]
+ ),
+ hello_erlang_sup:start_link().
+----
+
+The dispatch list is explained in great details in the
+xref:routing[Routing] chapter. For this tutorial we map the
+path `/` to the handler module `hello_handler`. This module
+doesn't exist yet, we still have to write it.
+
+If you build and start the release, then open http://localhost:8080
+in your browser, you will get an error because the module is missing.
+Any other URL, like http://localhost:8080/test, will result in a
+404 error.
+
+=== Handling requests
+
+Cowboy features different kinds of handlers, including REST
+and Websocket handlers. For this tutorial we will use a plain
+HTTP handler.
+
+First, let's generate a handler from a template.
+
+[source,bash]
+$ make new t=cowboy_http n=hello_handler
+
+You can then open the 'src/hello_handler.erl' file and modify
+the `init/2` function like this to send a reply.
+
+[source,erlang]
+----
+init(Req, Opts) ->
+ Req2 = cowboy_req:reply(200,
+ [{<<"content-type">>, <<"text/plain">>}],
+ <<"Hello Erlang!">>,
+ Req),
+ {ok, Req2, Opts}.
+----
+
+What the above code does is send a `200 OK` reply, with the
+`content-type` header set to `text/plain` and the response
+body set to `Hello Erlang!`.
+
+If you run the release and open http://localhost:8080
+in your browser, you should get a nice `Hello Erlang!` displayed!
diff --git a/docs/en/cowboy/2.0/guide/getting_started/index.html b/docs/en/cowboy/2.0/guide/getting_started/index.html
new file mode 100644
index 00000000..065d5572
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/getting_started/index.html
@@ -0,0 +1,289 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Getting started</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Getting started</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_bootstrap">Bootstrap</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>First, let&#8217;s create the directory for our application.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ mkdir hello_erlang
+$ cd hello_erlang</tt></pre></div></div>
+<div class="paragraph"><p>Then we need to download Erlang.mk. Either use the following
+command or download it manually.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ wget https<span style="color: #990000">:</span>//raw<span style="color: #990000">.</span>githubusercontent<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk/master/erlang<span style="color: #990000">.</span>mk</tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap bootstrap-rel</tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make run
+<span style="color: #990000">...</span>
+<span style="color: #990000">(</span>hello_erlang@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">)</span><span style="color: #993399">1</span><span style="color: #990000">&gt;</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_cowboy_setup">Cowboy setup</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Modifying the <em>Makefile</em> allows the build system to know it needs to
+fetch and compile Cowboy. To do that we simply need to add two lines
+to our Makefile to make it look like this:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PROJECT =</span> hello_erlang
+
+<span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">dep_cowboy_commit =</span> master
+
+include erlang.mk</tt></pre></div></div>
+<div class="paragraph"><p>If you run <code>make run</code> now, Cowboy will be included in the release
+and started automatically. This is not enough however, as Cowboy
+doesn&#8217;t do anything by default. We still need to tell Cowboy to
+listen for connections.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_listening_for_connections">Listening for connections</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>We will do this when our application starts. It&#8217;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></div>
+<div class="paragraph"><p>Open the <em>src/hello_erlang_app.erl</em> file and add the necessary
+code to the <code>start/2</code> function to make it look like this:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">start</span></span>(<span style="color: #009900">_Type</span>, <span style="color: #009900">_Args</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
+ {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">hello_handler</span>, []}]}
+ ]),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:start_http</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
+ [{<span style="color: #FF6600">env</span>, [{<span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>}]}]
+ ),
+ <span style="font-weight: bold"><span style="color: #000000">hello_erlang_sup:start_link</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The dispatch list is explained in great details in the
+<a href="../routing">Routing</a> chapter. For this tutorial we map the
+path <code>/</code> to the handler module <code>hello_handler</code>. This module
+doesn&#8217;t exist yet, we still have to write it.</p></div>
+<div class="paragraph"><p>If you build and start the release, then open <a href="http://localhost:8080">http://localhost:8080</a>
+in your browser, 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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handling_requests">Handling requests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy features different kinds of handlers, including REST
+and Websocket handlers. For this tutorial we will use a plain
+HTTP handler.</p></div>
+<div class="paragraph"><p>First, let&#8217;s generate a handler from a template.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make new <span style="color: #009900">t</span><span style="color: #990000">=</span>cowboy_http <span style="color: #009900">n</span><span style="color: #990000">=</span>hello_handler</tt></pre></div></div>
+<div class="paragraph"><p>You can then open the <em>src/hello_handler.erl</em> file and modify
+the <code>init/2</code> function like this to send a reply.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>,
+ [{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}],
+ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello Erlang!"</span><span style="color: #990000">&gt;&gt;</span>,
+ <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>If you run the release 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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/handlers.asciidoc b/docs/en/cowboy/2.0/guide/handlers.asciidoc
new file mode 100644
index 00000000..b6cefddc
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/handlers.asciidoc
@@ -0,0 +1,105 @@
+[[handlers]]
+== Handlers
+
+Handlers are Erlang modules that handle HTTP requests.
+
+=== Plain HTTP handlers
+
+The most basic handler in Cowboy implements the mandatory
+`init/2` callback, manipulates the request, optionally
+sends a response and then returns.
+
+This callback receives the xref:req[Req object] and the options
+defined during the xref:routing[router configuration].
+
+A handler that does nothing would look like this:
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {ok, Req, #state{}}.
+----
+
+Despite sending no reply, a `204 No Content` reply will be
+sent to the client, as Cowboy makes sure that a reply is
+sent for every request.
+
+We need to use the Req object for sending a reply.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ Req2 = cowboy_req:reply(200, [
+ {<<"content-type">>, <<"text/plain">>}
+ ], <<"Hello World!">>, Req),
+ {ok, Req2, #state{}}.
+----
+
+As you can see we return a 3-tuple. `ok` means that the
+handler ran successfully. The Req object is returned as
+it may have been modified as is the case here: replying
+returns a modified Req object that you need to return
+back to Cowboy for proper operations.
+
+The last value of the tuple is a state that will be used
+in every subsequent callbacks to this handler. Plain HTTP
+handlers only have one additional callback, the optional
+`terminate/3`.
+
+=== Other handlers
+
+The `init/2` callback can also be used to inform Cowboy
+that this is a different kind of handler and that Cowboy
+should switch to it. To do this you simply need to return
+the module name of the handler type you want to switch to.
+
+Cowboy comes with three handler types you can switch to:
+xref:rest_handlers[cowboy_rest], xref:ws_handlers[cowboy_websocket]
+and xref:loop_handlers[cowboy_loop]. In addition to those you
+can define your own handler types.
+
+Switching is simple. Instead of returning `ok`, you simply
+return the name of the handler type you want to use. The
+following snippet switches to a Websocket handler:
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_websocket, Req, #state{}}.
+----
+
+You can also switch to your own custom handler type:
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {my_handler_type, Req, #state{}}.
+----
+
+How to implement a custom handler type is described in the
+xref:sub_protocols[Sub protocols] chapter.
+
+=== Cleaning up
+
+All handlers coming with Cowboy allow the use of the optional
+`terminate/3` callback.
+
+[source,erlang]
+----
+terminate(_Reason, Req, State) ->
+ ok.
+----
+
+This callback is strictly reserved for any required cleanup.
+You cannot send a response from this function. There is no
+other return value.
+
+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.
+
+Note that while this function may be called in a Websocket
+handler, it is generally not useful to do any clean up as
+the process terminates immediately after calling this callback
+when using Websocket.
diff --git a/docs/en/cowboy/2.0/guide/handlers/index.html b/docs/en/cowboy/2.0/guide/handlers/index.html
new file mode 100644
index 00000000..4d42be27
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/handlers/index.html
@@ -0,0 +1,242 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Handlers</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Handlers</span></h1>
+
+<div class="paragraph"><p>Handlers are Erlang modules that handle HTTP requests.</p></div>
+<div class="sect1">
+<h2 id="_plain_http_handlers">Plain HTTP handlers</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The most basic handler in Cowboy implements the mandatory
+<code>init/2</code> callback, manipulates the request, optionally
+sends a response and then returns.</p></div>
+<div class="paragraph"><p>This callback receives the <a href="../req">Req object</a> and the options
+defined during the <a href="../routing">router configuration</a>.</p></div>
+<div class="paragraph"><p>A handler that does nothing would look like this:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Despite sending no reply, a <code>204 No Content</code> reply will be
+sent to the client, as Cowboy makes sure that a reply is
+sent for every request.</p></div>
+<div class="paragraph"><p>We need to use the Req object for sending a reply.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}
+ ], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Hello World!"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req2</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>As you can see we return a 3-tuple. <code>ok</code> means that the
+handler ran successfully. The Req object is returned as
+it may have been modified as is the case here: replying
+returns a modified Req object that you need to return
+back to Cowboy for proper operations.</p></div>
+<div class="paragraph"><p>The last value of the tuple is a state that will be used
+in every subsequent callbacks to this handler. Plain HTTP
+handlers only have one additional callback, the optional
+<code>terminate/3</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_other_handlers">Other handlers</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>init/2</code> callback can also be used to inform Cowboy
+that this is a different kind of handler and that Cowboy
+should switch to it. To do this you simply need to return
+the module name of the handler type you want to switch to.</p></div>
+<div class="paragraph"><p>Cowboy comes with three handler types you can switch to:
+<a href="../rest_handlers">cowboy_rest</a>, <a href="#ws_handlers">cowboy_websocket</a>
+and <a href="../loop_handlers">cowboy_loop</a>. In addition to those you
+can define your own handler types.</p></div>
+<div class="paragraph"><p>Switching is simple. Instead of returning <code>ok</code>, you simply
+return the name of the handler type you want to use. The
+following snippet switches to a Websocket handler:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also switch to your own custom handler type:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">my_handler_type</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>How to implement a custom handler type is described in the
+<a href="../sub_protocols">Sub protocols</a> chapter.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_cleaning_up">Cleaning up</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All handlers coming with Cowboy allow the use of the optional
+<code>terminate/3</code> callback.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">terminate</span></span>(<span style="color: #009900">_Reason</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #FF6600">ok</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Note that while this function may be called in a Websocket
+handler, it is generally not useful to do any clean up as
+the process terminates immediately after calling this callback
+when using Websocket.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/hooks.asciidoc b/docs/en/cowboy/2.0/guide/hooks.asciidoc
new file mode 100644
index 00000000..fc79f8ac
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/hooks.asciidoc
@@ -0,0 +1,46 @@
+[[hooks]]
+== Hooks
+
+Hooks allow the user to customize Cowboy's behavior during specific
+operations.
+
+=== Onresponse
+
+The `onresponse` 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.
+
+Note that 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.
+
+You can specify the `onresponse` hook when creating the listener.
+
+[source,erlang]
+----
+cowboy:start_http(my_http_listener, 100,
+ [{port, 8080}],
+ [
+ {env, [{dispatch, Dispatch}]},
+ {onresponse, fun ?MODULE:custom_404_hook/4}
+ ]
+).
+----
+
+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.
+
+[source,erlang]
+----
+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))}),
+ cowboy_req:reply(404, Headers2, Body, Req);
+custom_404_hook(_, _, _, Req) ->
+ Req.
+----
+
+Again, make sure to always return the last request object obtained.
diff --git a/docs/en/cowboy/2.0/guide/hooks/index.html b/docs/en/cowboy/2.0/guide/hooks/index.html
new file mode 100644
index 00000000..31b73d25
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/hooks/index.html
@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Hooks</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Hooks</span></h1>
+
+<div class="paragraph"><p>Hooks allow the user to customize Cowboy&#8217;s behavior during specific
+operations.</p></div>
+<div class="sect1">
+<h2 id="_onresponse">Onresponse</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Note that 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></div>
+<div class="paragraph"><p>You can specify the <code>onresponse</code> hook when creating the listener.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">cowboy:start_http</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+ [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
+ [
+ {<span style="color: #FF6600">env</span>, [{<span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>}]},
+ {<span style="color: #FF6600">onresponse</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> <span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">custom_404_hook</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>}
+ ]
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">custom_404_hook</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Headers</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"404 Not Found."</span><span style="color: #990000">&gt;&gt;</span>,
+ <span style="color: #009900">Headers2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyreplace</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-length"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Headers</span>,
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-length"</span><span style="color: #990000">&gt;&gt;</span>, <span style="font-weight: bold"><span style="color: #000080">integer_to_list</span></span>(<span style="font-weight: bold"><span style="color: #000080">byte_size</span></span>(<span style="color: #009900">Body</span>))}),
+ <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">404</span>, <span style="color: #009900">Headers2</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>);
+<span style="font-weight: bold"><span style="color: #000000">custom_404_hook</span></span>(<span style="color: #990000">_</span>, <span style="color: #990000">_</span>, <span style="color: #990000">_</span>, <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Again, make sure to always return the last request object obtained.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/http_req_resp.png b/docs/en/cowboy/2.0/guide/http_req_resp.png
new file mode 100644
index 00000000..8c9cae99
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/http_req_resp.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/http_req_resp.svg b/docs/en/cowboy/2.0/guide/http_req_resp.svg
new file mode 100644
index 00000000..d1e7f784
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/http_req_resp.svg
@@ -0,0 +1,520 @@
+<?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="82.28271"
+ inkscape:cy="764.83183"
+ 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="use5779"
+ d="M 194.29441,340.67017 369.64493,238.3853"
+ style="fill:none;stroke:#6d8e41;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:2, 4;stroke-dashoffset:0" />
+ <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 178.49877,231.1517 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" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g5650"
+ id="use5753"
+ transform="translate(475.11201,-117.70525)"
+ 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.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="43.721401"
+ y="276.1973"
+ 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,-31.336292)"
+ 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="use5660"
+ transform="translate(205.03261,-207.5)">
+ <path
+ 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"
+ d="m -57.78256,351.41962 0,52.3259"
+ id="path3051"
+ inkscape:connector-curvature="0" />
+ <path
+ 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="path3053"
+ 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="2.1823437"
+ transform="matrix(0.58787746,0,0,0.58787746,73.160466,163.35774)" />
+ </g>
+ <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-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" />
+ <rect
+ rx="15"
+ y="386.37247"
+ x="94.955292"
+ height="36.392323"
+ width="104.5895"
+ id="use5363"
+ 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" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#use5361"
+ id="use5365"
+ transform="translate(0,88.97624)"
+ 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="323.0921"
+ 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="323.0921">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="146.53125"
+ y="410.38519"
+ 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="410.38519">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="-362.30792"
+ 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="-362.30792"
+ 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,122.34788)"
+ 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,270.59134)"
+ 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,350.22962)"
+ 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,349.47315)"
+ 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="236.73991"
+ 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="236.73991">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="323.09195"
+ 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="323.09195">onresponse</tspan></text>
+ </g>
+</svg>
diff --git a/docs/en/cowboy/2.0/guide/index.html b/docs/en/cowboy/2.0/guide/index.html
new file mode 100644
index 00000000..53dab6d1
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/index.html
@@ -0,0 +1,326 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Cowboy User Guide</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Cowboy User Guide</span></h1>
+
+<div class="sect1">
+<h2 id="_rationale">Rationale</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="modern_web/">The modern Web</a>
+</p>
+</li>
+<li>
+<p>
+<a href="erlang_web/">Erlang and the Web</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_introduction">Introduction</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="introduction/">Introduction</a>
+</p>
+</li>
+<li>
+<p>
+<a href="getting_started/">Getting started</a>
+</p>
+</li>
+<li>
+<p>
+<a href="overview/">Request overview</a>
+</p>
+</li>
+<li>
+<p>
+<a href="erlang_beginners/">Erlang for beginners</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="routing/">routing</a>
+</p>
+</li>
+<li>
+<p>
+<a href="constraints/">Constraints</a>
+</p>
+</li>
+<li>
+<p>
+<a href="static_files/">Static files</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_and_response">Request and response</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="handlers/">Handlers</a>
+</p>
+</li>
+<li>
+<p>
+<a href="loop_handlers/">Loop handlers</a>
+</p>
+</li>
+<li>
+<p>
+<a href="req/">The Req object</a>
+</p>
+</li>
+<li>
+<p>
+<a href="req_body/">Reading the request body</a>
+</p>
+</li>
+<li>
+<p>
+<a href="resp/">Sending a response</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cookies/">Using cookies</a>
+</p>
+</li>
+<li>
+<p>
+<a href="multipart/">Multipart</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_rest">REST</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="rest_principles/">REST principles</a>
+</p>
+</li>
+<li>
+<p>
+<a href="rest_handlers/">Handling REST requests</a>
+</p>
+</li>
+<li>
+<p>
+<a href="rest_flowcharts/">REST flowcharts</a>
+</p>
+</li>
+<li>
+<p>
+<a href="resource_design/">Designing a resource handler</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_websocket">Websocket</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="ws_protocol/">The Websocket protocol</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ws_handlers/">Handling Websocket connections</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_internals">Internals</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="architecture/">Architecture</a>
+</p>
+</li>
+<li>
+<p>
+<a href="broken_clients/">Dealing with broken clients</a>
+</p>
+</li>
+<li>
+<p>
+<a href="middlewares/">Middlewares</a>
+</p>
+</li>
+<li>
+<p>
+<a href="sub_protocols/">Sub protocols</a>
+</p>
+</li>
+<li>
+<p>
+<a href="hooks/">Hooks</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/introduction.asciidoc b/docs/en/cowboy/2.0/guide/introduction.asciidoc
new file mode 100644
index 00000000..9cdcbc99
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/introduction.asciidoc
@@ -0,0 +1,56 @@
+[[introduction]]
+== Introduction
+
+Cowboy is a small, fast and modular HTTP server written in Erlang.
+
+Cowboy aims to provide a complete HTTP stack, including its derivatives
+Websocket and REST. Cowboy currently supports HTTP/1.0, HTTP/1.1, HTTP/2,
+Websocket (all implemented drafts + standard) and Webmachine-based REST.
+
+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.
+
+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.
+
+=== Prerequisites
+
+Beginner Erlang knowledge is recommended for reading this guide.
+
+Knowledge of the HTTP protocol is recommended but not required, as it
+will be detailed throughout the guide.
+
+=== Supported platforms
+
+Cowboy is tested and supported on Linux.
+
+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.
+
+Cowboy is developed for Erlang/OTP 17.0, 17.1.2 and 17.3. By the time
+this branch gets released the target version will probably be 18.0 and
+above.
+
+Cowboy may be compiled on other Erlang versions with small source code
+modifications but there is no guarantee that it will work as expected.
+
+Cowboy uses the maps data type which was introduced in Erlang 17.0.
+
+=== Versioning
+
+Cowboy uses http://semver.org/[Semantic Versioning 2.0.0].
+
+=== Conventions
+
+In the HTTP protocol, the method name is case sensitive. All standard
+method names are uppercase.
+
+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.
+
+The same applies to any other case insensitive value.
diff --git a/docs/en/cowboy/2.0/guide/introduction/index.html b/docs/en/cowboy/2.0/guide/introduction/index.html
new file mode 100644
index 00000000..1a43c339
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/introduction/index.html
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Introduction</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Introduction</span></h1>
+
+<div class="paragraph"><p>Cowboy is a small, fast and modular HTTP server written in Erlang.</p></div>
+<div class="paragraph"><p>Cowboy aims to provide a complete HTTP stack, including its derivatives
+Websocket and REST. Cowboy currently supports HTTP/1.0, HTTP/1.1, HTTP/2,
+Websocket (all implemented drafts + standard) and Webmachine-based REST.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_prerequisites">Prerequisites</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Beginner Erlang knowledge is recommended for reading this guide.</p></div>
+<div class="paragraph"><p>Knowledge of the HTTP protocol is recommended but not required, as it
+will be detailed throughout the guide.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_supported_platforms">Supported platforms</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy is tested and supported on Linux.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Cowboy is developed for Erlang/OTP 17.0, 17.1.2 and 17.3. By the time
+this branch gets released the target version will probably be 18.0 and
+above.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Cowboy uses the maps data type which was introduced in Erlang 17.0.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_versioning">Versioning</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_conventions">Conventions</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
+method names are uppercase.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/loop_handlers.asciidoc b/docs/en/cowboy/2.0/guide/loop_handlers.asciidoc
new file mode 100644
index 00000000..58c42233
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/loop_handlers.asciidoc
@@ -0,0 +1,146 @@
+[[loop_handlers]]
+== Loop handlers
+
+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.
+
+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.
+
+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.
+
+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.
+
+Loop handlers essentially wait for one or more Erlang messages
+and feed these messages to the `info/3` callback. It also features
+the `init/2` and `terminate/3` callbacks which work the same as
+for plain HTTP handlers.
+
+=== Initialization
+
+The `init/2` function must return a `cowboy_loop` tuple to enable
+loop handler behavior. This tuple may optionally contain
+a timeout value and/or the atom `hibernate` to make the
+process enter hibernation until a message is received.
+
+This snippet enables the loop handler.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_loop, Req, #state{}}.
+----
+
+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.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_loop, Req, #state{}, 30000, hibernate}.
+----
+
+=== Receive loop
+
+Once initialized, Cowboy will wait for messages to arrive
+in the process' mailbox. When a message arrives, Cowboy
+calls the `info/3` function with the message, the Req object
+and the handler's state.
+
+The following snippet sends a reply when it receives a
+`reply` message from another process, or waits for another
+message otherwise.
+
+[source,erlang]
+----
+info({reply, Body}, Req, State) ->
+ Req2 = cowboy_req:reply(200, [], Body, Req),
+ {stop, Req2, State};
+info(_Msg, Req, State) ->
+ {ok, Req, State, hibernate}.
+----
+
+Do note that the `reply` tuple here may be any message
+and is simply an example.
+
+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.
+
+The callback may also choose to do nothing at all and just
+skip the message received.
+
+If a reply is sent, then the `stop` tuple should be returned.
+This will instruct Cowboy to end the request.
+
+Otherwise an `ok` tuple should be returned.
+
+=== Streaming loop
+
+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
+`init/2` callback and then using `cowboy_req:chunk/2`
+every time a message is received.
+
+The following snippet does exactly that. As you can see
+a chunk is sent every time a `chunk` message is received,
+and the loop is stopped by sending an `eof` message.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ Req2 = cowboy_req:chunked_reply(200, [], Req),
+ {cowboy_loop, Req2, #state{}}.
+
+info(eof, Req, State) ->
+ {stop, Req, State};
+info({chunk, Chunk}, Req, State) ->
+ cowboy_req:chunk(Chunk, Req),
+ {ok, Req, State};
+info(_Msg, Req, State) ->
+ {ok, Req, State}.
+----
+
+==== Cleaning up
+
+It is recommended that you set the connection header to
+`close` when replying, as this process may be reused for
+a subsequent request.
+
+Please refer to the xref:handlers[Handlers chapter]
+for general instructions about cleaning up.
+
+=== Timeout
+
+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.
+
+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
+`loop_max_buffer` middleware environment value.
+
+=== Hibernate
+
+To save memory, you may hibernate the process in between
+messages received. This is done by returning the atom
+`hibernate` as part of the `loop` tuple callbacks normally
+return. Just add the atom at the end and Cowboy will hibernate
+accordingly.
diff --git a/docs/en/cowboy/2.0/guide/loop_handlers/index.html b/docs/en/cowboy/2.0/guide/loop_handlers/index.html
new file mode 100644
index 00000000..d3081aac
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/loop_handlers/index.html
@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Loop handlers</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Loop handlers</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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/2</code> and <code>terminate/3</code> callbacks which work the same as
+for plain HTTP handlers.</p></div>
+<div class="sect1">
+<h2 id="_initialization">Initialization</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>init/2</code> function must return a <code>cowboy_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></div>
+<div class="paragraph"><p>This snippet enables the loop handler.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}, <span style="color: #993399">30000</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_receive_loop">Receive loop</h2>
+<div class="sectionbody">
+<div class="paragraph"><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&#8217;s state.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">reply</span>, <span style="color: #009900">Body</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [], <span style="color: #009900">Body</span>, <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req2</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Do note that the <code>reply</code> tuple here may be any message
+and is simply an example.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The callback may also choose to do nothing at all and just
+skip the message received.</p></div>
+<div class="paragraph"><p>If a reply is sent, then the <code>stop</code> tuple should be returned.
+This will instruct Cowboy to end the request.</p></div>
+<div class="paragraph"><p>Otherwise an <code>ok</code> tuple should be returned.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_streaming_loop">Streaming loop</h2>
+<div class="sectionbody">
+<div class="paragraph"><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/2</code> callback and then using <code>cowboy_req:chunk/2</code>
+every time a message is received.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunked_reply</span></span>(<span style="color: #993399">200</span>, [], <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">cowboy_loop</span>, <span style="color: #009900">Req2</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #FF6600">eof</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">info</span></span>({<span style="color: #FF6600">chunk</span>, <span style="color: #009900">Chunk</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #009900">Chunk</span>, <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">info</span></span>(<span style="color: #009900">_Msg</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="sect3">
+<h4 id="_cleaning_up">Cleaning up</h4>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Please refer to the <a href="../handlers">Handlers chapter</a>
+for general instructions about cleaning up.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_timeout">Timeout</h2>
+<div class="sectionbody">
+<div class="paragraph"><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&#8217;t be modified afterwards.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hibernate">Hibernate</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/middlewares.asciidoc b/docs/en/cowboy/2.0/guide/middlewares.asciidoc
new file mode 100644
index 00000000..e6be30dd
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/middlewares.asciidoc
@@ -0,0 +1,69 @@
+[[middlewares]]
+== Middlewares
+
+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.
+
+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.
+
+Cowboy will execute all middlewares in the given order, unless one
+of them decides to stop processing.
+
+=== Usage
+
+Middlewares only need to implement a single callback: `execute/2`.
+It is defined in the `cowboy_middleware` behavior.
+
+This callback has two arguments. The first is the `Req` object.
+The second is the environment.
+
+Middlewares can return one of three different values:
+
+* `{ok, Req, Env}` to continue the request processing
+* `{suspend, Module, Function, Args}` to hibernate
+* `{stop, Req}` to stop processing and move on to the next request
+
+Of note is that when hibernating, processing will resume on the given
+MFA, discarding all previous stacktrace. Make sure you keep the `Req`
+and `Env` in the arguments of this MFA for later use.
+
+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.
+
+=== Configuration
+
+The middleware environment is defined as the `env` 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.
+
+Two values in the environment are reserved:
+
+* `listener` contains the name of the listener
+* `result` contains the result of the processing
+
+The `listener` value is always defined. The `result` value can be
+set by any middleware. If set to anything other than `ok`, Cowboy
+will not process any subsequent requests on this connection.
+
+The middlewares that come with Cowboy may define or require other
+environment values to perform.
+
+You can update the environment by calling the `cowboy:set_env/3`
+convenience function, adding or replacing a value in the environment.
+
+=== Routing middleware
+
+The routing middleware requires the `dispatch` value. If routing
+succeeds, it will put the handler name and options in the `handler`
+and `handler_opts` values of the environment, respectively.
+
+=== Handler middleware
+
+The handler middleware requires the `handler` and `handler_opts`
+values. It puts the result of the request handling into `result`.
diff --git a/docs/en/cowboy/2.0/guide/middlewares/index.html b/docs/en/cowboy/2.0/guide/middlewares/index.html
new file mode 100644
index 00000000..09894d10
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/middlewares/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Middlewares</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Middlewares</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Cowboy will execute all middlewares in the given order, unless one
+of them decides to stop processing.</p></div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Middlewares only need to implement a single callback: <code>execute/2</code>.
+It is defined in the <code>cowboy_middleware</code> behavior.</p></div>
+<div class="paragraph"><p>This callback has two arguments. The first is the <code>Req</code> object.
+The second is the environment.</p></div>
+<div class="paragraph"><p>Middlewares can return one of three different values:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<code>{ok, Req, Env}</code> to continue the request processing
+</p>
+</li>
+<li>
+<p>
+<code>{suspend, Module, Function, Args}</code> to hibernate
+</p>
+</li>
+<li>
+<p>
+<code>{stop, Req}</code> to stop processing and move on to the next request
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Two values in the environment are reserved:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<code>listener</code> contains the name of the listener
+</p>
+</li>
+<li>
+<p>
+<code>result</code> contains the result of the processing
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The middlewares that come with Cowboy may define or require other
+environment values to perform.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_routing_middleware">Routing middleware</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handler_middleware">Handler middleware</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/modern_web.asciidoc b/docs/en/cowboy/2.0/guide/modern_web.asciidoc
new file mode 100644
index 00000000..732972f0
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/modern_web.asciidoc
@@ -0,0 +1,200 @@
+[[modern_web]]
+== The modern Web
+
+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.
+
+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.
+
+=== The prehistoric Web
+
+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.
+
+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.
+
+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.
+
+Most improvements done in recent years focused on reducing
+this load time and reducing the latency of the requests.
+
+=== HTTP/1.1
+
+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.
+
+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.
+
+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.
+
+=== REST
+
+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.
+
+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.
+
+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.
+
+HTTP/1.1 defines all the methods, headers and semantics required
+to implement RESTful systems.
+
+REST is most often used when designing web application APIs
+which are generally meant to be used by executable code directly.
+
+=== XmlHttpRequest
+
+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.
+
+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.
+
+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.
+
+=== Long-polling
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+=== HTML5
+
+HTML5 is, of course, the HTML version after HTML4. But HTML5
+emerged to solve a specific problem: dynamic web applications.
+
+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.
+
+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.
+
+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.
+
+The solution went on to become HTML5. At the time of writing
+it is being standardized.
+
+=== EventSource
+
+EventSource, sometimes also called Server-Sent Events, is a
+technology allowing servers to push data to HTML5 applications.
+
+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.
+
+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.
+
+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.
+
+=== Websocket
+
+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.
+
+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.
+
+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.
+
+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.
+
+=== HTTP/2
+
+HTTP/2 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.
+
+HTTP/2 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.
+HTTP/2 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.
+
+Browsers make use of TLS Application-Layer Protocol Negotiation
+extension to upgrade to an HTTP/2 connection seamlessly if the
+server supports it.
diff --git a/docs/en/cowboy/2.0/guide/modern_web/index.html b/docs/en/cowboy/2.0/guide/modern_web/index.html
new file mode 100644
index 00000000..69761906
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/modern_web/index.html
@@ -0,0 +1,329 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: The modern Web</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>The modern Web</span></h1>
+
+<div class="paragraph"><p>Let&#8217;s take a look at various technologies from the beginnings
+of the Web up to this day, and get a preview of what&#8217;s
+coming next.</p></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_the_prehistoric_web">The prehistoric Web</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Most improvements done in recent years focused on reducing
+this load time and reducing the latency of the requests.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_http_1_1">HTTP/1.1</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_rest">REST</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>REST defines constraints that systems must obey to in order to
+be RESTful. A system which doesn&#8217;t follow all the constraints
+cannot be considered RESTful.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>HTTP/1.1 defines all the methods, headers and semantics required
+to implement RESTful systems.</p></div>
+<div class="paragraph"><p>REST is most often used when designing web application APIs
+which are generally meant to be used by executable code directly.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_xmlhttprequest">XmlHttpRequest</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_long_polling">Long-polling</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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&#8217;t always play well with proxies.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_html5">HTML5</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>HTML5 is, of course, the HTML version after HTML4. But HTML5
+emerged to solve a specific problem: dynamic web applications.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Because HTML wasn&#8217;t enough, they started using proprietary
+solutions, often implemented using plug-ins. This wasn&#8217;t
+perfect of course, but worked well enough for most people.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The solution went on to become HTML5. At the time of writing
+it is being standardized.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_eventsource">EventSource</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>EventSource, sometimes also called Server-Sent Events, is a
+technology allowing servers to push data to HTML5 applications.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_websocket">Websocket</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_http_2">HTTP/2</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>HTTP/2 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></div>
+<div class="paragraph"><p>HTTP/2 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.
+HTTP/2 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></div>
+<div class="paragraph"><p>Browsers make use of TLS Application-Layer Protocol Negotiation
+extension to upgrade to an HTTP/2 connection seamlessly if the
+server supports it.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/multipart.asciidoc b/docs/en/cowboy/2.0/guide/multipart.asciidoc
new file mode 100644
index 00000000..20d53d51
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/multipart.asciidoc
@@ -0,0 +1,169 @@
+[[multipart]]
+== Multipart requests
+
+Multipart originates from MIME, an Internet standard that
+extends the format of emails. Multipart messages are a
+container for parts of any content-type.
+
+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.
+
+In the context of HTTP, multipart is most often used
+with the `multipart/form-data` content-type. This is
+the content-type you have to use when you want browsers
+to be allowed to upload files through HTML forms.
+
+Multipart is of course not required for uploading
+files, it is only required when you want to do so
+through HTML forms.
+
+You can read and parse multipart messages using the
+Req object directly.
+
+Cowboy defines two functions that allows you to get
+information about each part and read their contents.
+
+=== Structure
+
+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.
+
+=== Form-data
+
+In the normal case, when a form is submitted, the
+browser will use the `application/x-www-form-urlencoded`
+content-type. This type is just a list of keys and
+values and is therefore not fit for uploading files.
+
+That's where the `multipart/form-data` 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.
+
+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.
+
+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.
+
+=== Checking the content-type
+
+While there is a variety of multipart messages, the
+most common on the Web is `multipart/form-data`. It's
+the type of message being sent when an HTML form
+allows uploading files.
+
+You can quickly figure out if a multipart message
+has been sent by parsing the `content-type` header.
+
+[source,erlang]
+----
+{<<"multipart">>, <<"form-data">>, _}
+ = cowboy_req:parse_header(<<"content-type">>, Req).
+----
+
+=== Reading a multipart message
+
+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.
+
+[source,erlang]
+----
+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.
+----
+
+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.
+
+The function `cow_multipart:form_data/1` can be used
+to quickly obtain information about a part from a
+`multipart/form-data` message. This function will
+tell you if the part is for a normal field or if it
+is a file being uploaded.
+
+This can be used for example to allow large part bodies
+for files but crash when a normal field is too large.
+
+[source,erlang]
+----
+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.
+----
+
+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 `cowboy_req:body/2` function.
+
+=== Skipping unwanted parts
+
+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.
+
+The following snippet reads all part headers and skips
+all bodies:
+
+[source,erlang]
+----
+multipart(Req) ->
+ case cowboy_req:part(Req) of
+ {ok, _Headers, Req2} ->
+ multipart(Req2);
+ {done, Req2} ->
+ Req2
+ end.
+----
+
+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.
+
+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 `cowboy_req:part_body/1` function directly.
+
+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.
diff --git a/docs/en/cowboy/2.0/guide/multipart/index.html b/docs/en/cowboy/2.0/guide/multipart/index.html
new file mode 100644
index 00000000..2a443f10
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/multipart/index.html
@@ -0,0 +1,305 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Multipart requests</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Multipart requests</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Multipart is of course not required for uploading
+files, it is only required when you want to do so
+through HTML forms.</p></div>
+<div class="paragraph"><p>You can read and parse multipart messages using the
+Req object directly.</p></div>
+<div class="paragraph"><p>Cowboy defines two functions that allows you to get
+information about each part and read their contents.</p></div>
+<div class="sect1">
+<h2 id="_structure">Structure</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_form_data">Form-data</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>That&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_checking_the_content_type">Checking the content-type</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>While there is a variety of multipart messages, the
+most common on the Web is <code>multipart/form-data</code>. It&#8217;s
+the type of message being sent when an HTML form
+allows uploading files.</p></div>
+<div class="paragraph"><p>You can quickly figure out if a multipart message
+has been sent by parsing the <code>content-type</code> header.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"multipart"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"form-data"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">_</span>}
+ <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_reading_a_multipart_message">Reading a multipart message</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part</span></span>(<span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req3</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part_body</span></span>(<span style="color: #009900">Req2</span>),
+ <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req3</span>);
+ {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This can be used for example to allow large part bodies
+for files but crash when a normal field is too large.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part</span></span>(<span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req4</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:form_data</span></span>(<span style="color: #009900">Headers</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">data</span>, <span style="color: #009900">_FieldName</span>} <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req3</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part_body</span></span>(<span style="color: #009900">Req2</span>),
+ <span style="color: #009900">Req3</span>;
+ {<span style="color: #FF6600">file</span>, <span style="color: #009900">_FieldName</span>, <span style="color: #009900">_Filename</span>, <span style="color: #009900">_CType</span>, <span style="color: #009900">_CTransferEncoding</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req2</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
+ <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req4</span>);
+ {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part_body</span></span>(<span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span>;
+ {<span style="color: #FF6600">more</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req2</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_skipping_unwanted_parts">Skipping unwanted parts</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you do not want to read a part&#8217;s body, you can skip it.
+Skipping is easy. If you do not call the function to read
+the part&#8217;s body, Cowboy will automatically skip it when
+you request the next part.</p></div>
+<div class="paragraph"><p>The following snippet reads all part headers and skips
+all bodies:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:part</span></span>(<span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Headers</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req2</span>);
+ {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/overview.asciidoc b/docs/en/cowboy/2.0/guide/overview.asciidoc
new file mode 100644
index 00000000..3e5cbb74
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/overview.asciidoc
@@ -0,0 +1,150 @@
+[[overview]]
+== Request overview
+
+This chapter explains the different steps a request
+goes through until a response is sent, along with
+details of the Cowboy implementation.
+
+=== Request/response
+
+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.
+
+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.
+
+Requests take the following route in Cowboy:
+
+image::http_req_resp.png[HTTP request/response flowchart]
+
+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.
+
+The `acceptor` is the part of the server that accepts
+the connection and create an Erlang process to handle
+it. The `parser` then starts reading from the socket
+and handling requests as they come until the socket
+is closed.
+
+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.
+
+When a response is sent, you can optionally modify it
+or act upon it by enabling the `onresponse` hook. By
+default the response is sent directly to the client.
+
+=== And then?
+
+Behavior depends on what protocol is in use.
+
+HTTP/1.0 can only process one request per connection,
+so Cowboy will close the connection immediately after
+it sends the response.
+
+HTTP/1.1 allows the client to request that the server
+keeps the connection alive. This mechanism is described
+in the next section.
+
+HTTP/2 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.
+
+=== Keep-alive (HTTP/1.1)
+
+With HTTP/1.1, the connection may be left open for
+subsequent requests to come. This mechanism is called
+`keep-alive`.
+
+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.
+
+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 `connection: close` header, it will
+not override it and will close the connection as soon
+as the reply is sent.
+
+This snippet will force Cowboy to close the connection.
+
+[source,erlang]
+----
+Req2 = cowboy_req:reply(200, [
+ {<<"connection">>, <<"close">>},
+], <<"Closing the socket in 3.. 2.. 1..">>, Req).
+----
+
+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
+`max_keepalive` configuration value when starting an
+HTTP listener.
+
+[source,erlang]
+----
+cowboy:start_http(my_http_listener, 100, [{port, 8080}], [
+ {env, [{dispatch, Dispatch}]},
+ {max_keepalive, 5}
+]).
+----
+
+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 `terminate/3` function can
+be used for this purpose.
+
+=== Pipelining (HTTP/1.1)
+
+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.
+
+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.
+
+This is handled automatically by the server.
+
+=== Asynchronous requests (HTTP/2)
+
+In HTTP/2, the client can send a request at any time.
+And the server can send a response at any time too.
+
+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.
+
+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.
+
+HTTP/2 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.
diff --git a/docs/en/cowboy/2.0/guide/overview/index.html b/docs/en/cowboy/2.0/guide/overview/index.html
new file mode 100644
index 00000000..70a191dd
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/overview/index.html
@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Request overview</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Request overview</span></h1>
+
+<div class="paragraph"><p>This chapter explains the different steps a request
+goes through until a response is sent, along with
+details of the Cowboy implementation.</p></div>
+<div class="sect1">
+<h2 id="_request_response">Request/response</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Requests take the following route in Cowboy:</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../http_req_resp.png" alt="HTTP request/response flowchart" />
+</div>
+</div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>A response may be sent at many different points in the
+life of the request. If Cowboy can&#8217;t parse the request,
+it gives up with an error response. If the router can&#8217;t
+find the resource, it sends a not found error. Your
+own code can of course send a response at any time.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_and_then">And then?</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Behavior depends on what protocol is in use.</p></div>
+<div class="paragraph"><p>HTTP/1.0 can only process one request per connection,
+so Cowboy will close the connection immediately after
+it sends the response.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>HTTP/2 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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_keep_alive_http_1_1">Keep-alive (HTTP/1.1)</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This snippet will force Cowboy to close the connection.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"connection"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"close"</span><span style="color: #990000">&gt;&gt;</span>},
+], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Closing the socket in 3.. 2.. 1.."</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">cowboy:start_http</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}], [
+ {<span style="color: #FF6600">env</span>, [{<span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>}]},
+ {<span style="color: #FF6600">max_keepalive</span>, <span style="color: #993399">5</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_pipelining_http_1_1">Pipelining (HTTP/1.1)</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This is handled automatically by the server.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_asynchronous_requests_http_2">Asynchronous requests (HTTP/2)</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In HTTP/2, the client can send a request at any time.
+And the server can send a response at any time too.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>HTTP/2 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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/req.asciidoc b/docs/en/cowboy/2.0/guide/req.asciidoc
new file mode 100644
index 00000000..09d442af
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/req.asciidoc
@@ -0,0 +1,247 @@
+[[req]]
+== The Req object
+
+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.
+
+=== A special variable
+
+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 `cowboy_req`
+module.
+
+Almost all the calls to the `cowboy_req` module will
+return an updated request object. Just like you would
+keep the updated `State` variable in a gen_server,
+you MUST keep the updated `Req` variable in a Cowboy
+handler. Cowboy will use this object to know whether
+a response has been sent when the handler has finished
+executing.
+
+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.
+
+=== Overview of the cowboy_req interface
+
+With the exception of functions manipulating the request
+body, all functions return a single value. Depending on
+the function this can be the requested value (method,
+host, path, ...), a boolean (has_body, has_resp_header...)
+a new Req object (set_resp_body, set_resp_header...), or
+simply the atom `ok` (chunk, continue, ...).
+
+The request body reading functions may return `{Result, Req}`
+or `{Result, Value, Req}`. The functions in this category
+are `body/{1,2}`, `body_qs/{1,2}`, `part/{1,2}`, `part_body/{1,2}`.
+
+This chapter covers the access functions mainly. Cookies,
+request body and response functions are covered in their
+own chapters.
+
+=== Request
+
+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.
+
+The method identifies the action. Standard methods include
+GET, HEAD, OPTIONS, PATCH, POST, PUT, DELETE. Method names
+are case sensitive.
+
+[source,erlang]
+Method = cowboy_req:method(Req).
+
+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.
+
+[source,erlang]
+Host = cowboy_req:host(Req),
+Port = cowboy_req:port(Req),
+Path = cowboy_req:path(Req).
+
+The version used by the client can of course also be obtained.
+
+[source,erlang]
+Version = cowboy_req:version(Req).
+
+Do note however that clients claiming to implement one version
+of the protocol does not mean they implement it fully, or even
+properly.
+
+=== Bindings
+
+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.
+
+You can fetch a single binding. The value will be `undefined`
+if the binding doesn't exist.
+
+[source,erlang]
+Binding = cowboy_req:binding(my_binding, Req).
+
+If you need a different value when the binding doesn't exist,
+you can change the default.
+
+[source,erlang]
+Binding = cowboy_req:binding(my_binding, Req, 42).
+
+You can also obtain all bindings in one call. They will be
+returned as a list of key/value tuples.
+
+[source,erlang]
+AllBindings = cowboy_req:bindings(Req).
+
+If you used `...` at the beginning of the route's pattern
+for the host, you can retrieve the matched part of the host.
+The value will be `undefined` otherwise.
+
+[source,erlang]
+HostInfo = cowboy_req:host_info(Req).
+
+Similarly, if you used `...` at the end of the route's
+pattern for the path, you can retrieve the matched part,
+or get `undefined` otherwise.
+
+[source,erlang]
+PathInfo = cowboy_req:path_info(Req).
+
+=== Query string
+
+The raw query string can be obtained directly.
+
+[source,erlang]
+Qs = cowboy_req:qs(Req).
+
+You can parse the query string and then use standard library
+functions to access individual values.
+
+[source,erlang]
+QsVals = cowboy_req:parse_qs(Req),
+{_, Lang} = lists:keyfind(<<"lang">>, 1, QsVals).
+
+You can match the query string into a map.
+
+[source,erlang]
+#{id := ID, lang := Lang} = cowboy_req:match_qs([id, lang], Req).
+
+You can use constraints to validate the values while matching
+them. The following snippet will crash if the `id` value is
+not an integer number or if the `lang` value is empty. Additionally
+the `id` value will be converted to an integer term, saving
+you a conversion step.
+
+[source,erlang]
+QsMap = cowboy_req:match_qs([{id, int}, {lang, nonempty}], Req).
+
+Note that in the case of duplicate query string keys, the map
+value will become a list of the different values.
+
+Read more about ^constraints^.
+
+A default value can be provided. The default will be used
+if the `lang` key is not found. It will not be used if
+the key is found but has an empty value.
+
+[source,erlang]
+#{lang := Lang} = cowboy_req:match_qs([{lang, [], <<"en-US">>}], Req).
+
+If no default is provided and the value is missing, the
+query string is deemed invalid and the process will crash.
+
+=== Request URL
+
+You can reconstruct the full URL of the resource.
+
+[source,erlang]
+URL = cowboy_req:url(Req).
+
+You can also obtain only the base of the URL, excluding the
+path and query string.
+
+[source,erlang]
+BaseURL = cowboy_req:host_url(Req).
+
+=== Headers
+
+Cowboy allows you to obtain the header values as string,
+or parsed into a more meaningful representation.
+
+This will get the string value of a header.
+
+[source,erlang]
+HeaderVal = cowboy_req:header(<<"content-type">>, Req).
+
+You can of course set a default in case the header is missing.
+
+[source,erlang]
+HeaderVal = cowboy_req:header(<<"content-type">>, Req, <<"text/plain">>).
+
+And also obtain all headers.
+
+[source,erlang]
+AllHeaders = cowboy_req:headers(Req).
+
+To parse the previous header, simply call `parse_header/{2,3}`
+where you would call `header/{2,3}` otherwise.
+
+[source,erlang]
+ParsedVal = cowboy_req:parse_header(<<"content-type">>, Req).
+
+Cowboy will crash if it doesn't know how to parse the given
+header, or if the value is invalid.
+
+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.
+
+[source,erlang]
+----
+ParsedVal = cowboy_req:parse_header(<<"content-type">>, Req,
+ {<<"text">>, <<"plain">>, []}).
+----
+
+The list of known headers and default values is defined in the
+manual.
+
+=== Meta
+
+Cowboy will sometimes associate some meta information with
+the request. Built-in meta values are listed in the manual
+for their respective modules.
+
+This will get a meta value. The returned value will be `undefined`
+if it isn't defined.
+
+[source,erlang]
+MetaVal = cowboy_req:meta(websocket_version, Req).
+
+You can change the default value if needed.
+
+[source,erlang]
+MetaVal = cowboy_req:meta(websocket_version, Req, 13).
+
+You can also define your own meta values. The name must be
+an `atom()`.
+
+[source,erlang]
+Req2 = cowboy_req:set_meta(the_answer, 42, Req).
+
+=== Peer
+
+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.
+
+[source,erlang]
+{IP, Port} = cowboy_req:peer(Req).
diff --git a/docs/en/cowboy/2.0/guide/req/index.html b/docs/en/cowboy/2.0/guide/req/index.html
new file mode 100644
index 00000000..c3442c64
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/req/index.html
@@ -0,0 +1,443 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: The Req object</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>The Req object</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_a_special_variable">A special variable</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_overview_of_the_cowboy_req_interface">Overview of the cowboy_req interface</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>With the exception of functions manipulating the request
+body, all functions return a single value. Depending on
+the function this can be the requested value (method,
+host, path, &#8230;), a boolean (has_body, has_resp_header&#8230;)
+a new Req object (set_resp_body, set_resp_header&#8230;), or
+simply the atom <code>ok</code> (chunk, continue, &#8230;).</p></div>
+<div class="paragraph"><p>The request body reading functions may return <code>{Result, Req}</code>
+or <code>{Result, Value, Req}</code>. The functions in this category
+are <code>body/{1,2}</code>, <code>body_qs/{1,2}</code>, <code>part/{1,2}</code>, <code>part_body/{1,2}</code>.</p></div>
+<div class="paragraph"><p>This chapter covers the access functions mainly. Cookies,
+request body and response functions are covered in their
+own chapters.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request">Request</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The method identifies the action. Standard methods include
+GET, HEAD, OPTIONS, PATCH, POST, PUT, DELETE. Method names
+are case sensitive.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Method</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:method</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host</span></span>(<span style="color: #009900">Req</span>),
+<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:port</span></span>(<span style="color: #009900">Req</span>),
+<span style="color: #009900">Path</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The version used by the client can of course also be obtained.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Version</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:version</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_bindings">Bindings</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>You can fetch a single binding. The value will be <code>undefined</code>
+if the binding doesn&#8217;t exist.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Binding</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">my_binding</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If you need a different value when the binding doesn&#8217;t exist,
+you can change the default.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Binding</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:binding</span></span>(<span style="color: #FF6600">my_binding</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">42</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also obtain all bindings in one call. They will be
+returned as a list of key/value tuples.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">AllBindings</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:bindings</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If you used <code>...</code> at the beginning of the route&#8217;s pattern
+for the host, you can retrieve the matched part of the host.
+The value will be <code>undefined</code> otherwise.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HostInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Similarly, if you used <code>...</code> at the end of the route&#8217;s
+pattern for the path, you can retrieve the matched part,
+or get <code>undefined</code> otherwise.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathInfo</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path_info</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_query_string">Query string</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The raw query string can be obtained directly.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Qs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:qs</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can parse the query string and then use standard library
+functions to access individual values.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">QsVals</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_qs</span></span>(<span style="color: #009900">Req</span>),
+{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"lang"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">QsVals</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can match the query string into a map.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">id</span> <span style="color: #990000">:=</span> <span style="color: #009900">ID</span>, <span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([<span style="color: #FF6600">id</span>, <span style="color: #FF6600">lang</span>], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can use constraints to validate the values while matching
+them. The following snippet will crash if the <code>id</code> value is
+not an integer number or if the <code>lang</code> value is empty. Additionally
+the <code>id</code> value will be converted to an integer term, saving
+you a conversion step.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">QsMap</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">id</span>, <span style="color: #FF6600">int</span>}, {<span style="color: #FF6600">lang</span>, <span style="color: #FF6600">nonempty</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that in the case of duplicate query string keys, the map
+value will become a list of the different values.</p></div>
+<div class="paragraph"><p>Read more about <sup>constraints</sup>.</p></div>
+<div class="paragraph"><p>A default value can be provided. The default will be used
+if the <code>lang</code> key is not found. It will not be used if
+the key is found but has an empty value.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">lang</span> <span style="color: #990000">:=</span> <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:match_qs</span></span>([{<span style="color: #FF6600">lang</span>, [], <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"en-US"</span><span style="color: #990000">&gt;&gt;</span>}], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If no default is provided and the value is missing, the
+query string is deemed invalid and the process will crash.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_url">Request URL</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can reconstruct the full URL of the resource.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">URL</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:url</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also obtain only the base of the URL, excluding the
+path and query string.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">BaseURL</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host_url</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_headers">Headers</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy allows you to obtain the header values as string,
+or parsed into a more meaningful representation.</p></div>
+<div class="paragraph"><p>This will get the string value of a header.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HeaderVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can of course set a default in case the header is missing.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HeaderVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>And also obtain all headers.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">AllHeaders</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>To parse the previous header, simply call <code>parse_header/{2,3}</code>
+where you would call <code>header/{2,3}</code> otherwise.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Cowboy will crash if it doesn&#8217;t know how to parse the given
+header, or if the value is invalid.</p></div>
+<div class="paragraph"><p>You can of course define a default value. Note that the default
+value you specify here is the parsed value you&#8217;d like to get
+by default.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">ParsedVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>,
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"plain"</span><span style="color: #990000">&gt;&gt;</span>, []})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The list of known headers and default values is defined in the
+manual.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_meta">Meta</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This will get a meta value. The returned value will be <code>undefined</code>
+if it isn&#8217;t defined.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">MetaVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:meta</span></span>(<span style="color: #FF6600">websocket_version</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can change the default value if needed.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">MetaVal</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:meta</span></span>(<span style="color: #FF6600">websocket_version</span>, <span style="color: #009900">Req</span>, <span style="color: #993399">13</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also define your own meta values. The name must be
+an <code>atom()</code>.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_meta</span></span>(<span style="color: #FF6600">the_answer</span>, <span style="color: #993399">42</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_peer">Peer</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #009900">IP</span>, <span style="color: #009900">Port</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:peer</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/req_body.asciidoc b/docs/en/cowboy/2.0/guide/req_body.asciidoc
new file mode 100644
index 00000000..d2a43d24
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/req_body.asciidoc
@@ -0,0 +1,152 @@
+[[req_body]]
+== Reading the request body
+
+The Req object also allows you to read the request body.
+
+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.
+
+Cowboy will not attempt to read the body until you do.
+If handler execution ends without reading it, Cowboy
+will simply skip it.
+
+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.
+
+=== Check for request body
+
+You can check whether a body was sent with the request.
+
+[source,erlang]
+cowboy_req:has_body(Req).
+
+It will return `true` if there is a request body, and
+`false` otherwise.
+
+Note that it is generally safe to assume that a body is
+sent for `POST`, `PUT` and `PATCH` requests, without
+having to explicitly check for it.
+
+=== Request body length
+
+You can obtain the body length if it was sent with the
+request.
+
+[source,erlang]
+Length = cowboy_req:body_length(Req).
+
+The value returned will be `undefined` 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.
+
+=== Reading the body
+
+You can read the whole body directly in one call.
+
+[source,erlang]
+{ok, Body, Req2} = cowboy_req:body(Req).
+
+By default, Cowboy will attempt to read up to a
+size of 8MB. You can override this limit as needed.
+
+[source,erlang]
+{ok, Body, Req2} = cowboy_req:body(Req, [{length, 100000000}]).
+
+You can also disable it.
+
+[source,erlang]
+{ok, Body, Req2} = cowboy_req:body(Req, [{length, infinity}]).
+
+It is recommended that you do not disable it for public
+facing websites.
+
+If the body is larger than the limit, then Cowboy will return
+a `more` tuple instead, allowing you to stream it if you
+would like to.
+
+=== Streaming the body
+
+You can stream the request body by chunks.
+
+Cowboy returns a `more` tuple when there is more body to
+be read, and an `ok` tuple for the last chunk. This allows
+you to loop over all chunks.
+
+[source,erlang]
+----
+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.
+----
+
+You can of course set the `length` option to configure the
+size of chunks.
+
+=== Rate of data transmission
+
+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.
+
+The `read_length` option defines the maximum amount of data
+to be received from the socket at once, in bytes.
+
+The `read_timeout` option defines the time Cowboy waits
+before that amount is received, in milliseconds.
+
+=== Transfer and content decoding
+
+Cowboy will by default decode the chunked transfer-encoding
+if any. It will not decode any content-encoding by default.
+
+The first time you call a body function you can set the
+`transfer_decode` and `content_decode` options. If the body
+was already started being read these options are simply
+ignored.
+
+The following example shows how to set both options.
+
+[source,erlang]
+----
+{ok, Data, Req2} = cowboy_req:body(Req, [
+ {transfer_decode, fun transfer_decode/2, TransferState},
+ {content_decode, fun content_decode/1}
+]).
+----
+
+=== Reading a form urlencoded body
+
+You can directly obtain a list of key/value pairs if the
+body was sent using the application/x-www-form-urlencoded
+content-type.
+
+[source,erlang]
+{ok, KeyValues, Req2} = cowboy_req:body_qs(Req).
+
+You can then retrieve an individual value from that list.
+
+[source,erlang]
+{_, Lang} = lists:keyfind(lang, 1, KeyValues).
+
+You should not attempt to match on the list as the order
+of the values is undefined.
+
+By default Cowboy will reject bodies with a size above
+64KB when using this function. You can override this limit
+by setting the `length` option.
+
+[source,erlang]
+{ok, KeyValues, Req2} = cowboy_req:body_qs(Req, [{length, 2000000}]).
diff --git a/docs/en/cowboy/2.0/guide/req_body/index.html b/docs/en/cowboy/2.0/guide/req_body/index.html
new file mode 100644
index 00000000..ac43be1d
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/req_body/index.html
@@ -0,0 +1,312 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Reading the request body</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Reading the request body</span></h1>
+
+<div class="paragraph"><p>The Req object also allows you to read the request body.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_check_for_request_body">Check for request body</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can check whether a body was sent with the request.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>It will return <code>true</code> if there is a request body, and
+<code>false</code> otherwise.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_body_length">Request body length</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can obtain the body length if it was sent with the
+request.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_length</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The value returned will be <code>undefined</code> if the length
+couldn&#8217;t be figured out from the request headers. If
+there&#8217;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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_reading_the_body">Reading the body</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can read the whole body directly in one call.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>By default, Cowboy will attempt to read up to a
+size of 8MB. You can override this limit as needed.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body</span></span>(<span style="color: #009900">Req</span>, [{<span style="font-weight: bold"><span style="color: #000080">length</span></span>, <span style="color: #993399">100000000</span>}])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also disable it.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body</span></span>(<span style="color: #009900">Req</span>, [{<span style="font-weight: bold"><span style="color: #000080">length</span></span>, <span style="color: #FF6600">infinity</span>}])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>It is recommended that you do not disable it for public
+facing websites.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_streaming_the_body">Streaming the body</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can stream the request body by chunks.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">body_to_console</span></span>(<span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body</span></span>(<span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s"</span>, [<span style="color: #009900">Data</span>]),
+ <span style="color: #009900">Req2</span>;
+ {<span style="color: #FF6600">more</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s"</span>, [<span style="color: #009900">Data</span>]),
+ <span style="font-weight: bold"><span style="color: #000000">body_to_console</span></span>(<span style="color: #009900">Req2</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can of course set the <code>length</code> option to configure the
+size of chunks.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_rate_of_data_transmission">Rate of data transmission</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The <code>read_length</code> option defines the maximum amount of data
+to be received from the socket at once, in bytes.</p></div>
+<div class="paragraph"><p>The <code>read_timeout</code> option defines the time Cowboy waits
+before that amount is received, in milliseconds.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_transfer_and_content_decoding">Transfer and content decoding</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy will by default decode the chunked transfer-encoding
+if any. It will not decode any content-encoding by default.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The following example shows how to set both options.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body</span></span>(<span style="color: #009900">Req</span>, [
+ {<span style="color: #FF6600">transfer_decode</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> <span style="font-weight: bold"><span style="color: #000000">transfer_decode</span></span><span style="color: #990000">/</span><span style="color: #993399">2</span>, <span style="color: #009900">TransferState</span>},
+ {<span style="color: #FF6600">content_decode</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> <span style="font-weight: bold"><span style="color: #000000">content_decode</span></span><span style="color: #990000">/</span><span style="color: #993399">1</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_reading_a_form_urlencoded_body">Reading a form urlencoded body</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_qs</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can then retrieve an individual value from that list.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #990000">_</span>, <span style="color: #009900">Lang</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:keyfind</span></span>(<span style="color: #FF6600">lang</span>, <span style="color: #993399">1</span>, <span style="color: #009900">KeyValues</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You should not attempt to match on the list as the order
+of the values is undefined.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">KeyValues</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:body_qs</span></span>(<span style="color: #009900">Req</span>, [{<span style="font-weight: bold"><span style="color: #000080">length</span></span>, <span style="color: #993399">2000000</span>}])<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/resource_design.asciidoc b/docs/en/cowboy/2.0/guide/resource_design.asciidoc
new file mode 100644
index 00000000..691953f1
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/resource_design.asciidoc
@@ -0,0 +1,221 @@
+[[resource_design]]
+== Designing a resource handler
+
+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.
+
+=== The service
+
+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
+`service_available` callback.
+
+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 `known_methods` callback.
+
+=== Type of resource handler
+
+Am I writing a handler for a collection of resources,
+or for a single resource?
+
+The semantics for each of these are quite different.
+You should not mix collection and single resource in
+the same handler.
+
+=== Collection handler
+
+Skip this section if you are not doing a collection.
+
+Is the collection hardcoded or dynamic? For example,
+if you use the route `/users` for the collection of
+users then the collection is hardcoded; if you use
+`/forums/:category` for the collection of threads
+then it isn't. When the collection is hardcoded you
+can safely assume the resource always exists.
+
+What methods should I implement?
+
+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.
+
+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.
+
+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.
+
+The next methods are more rarely allowed.
+
+PUT is used to create a new collection (when
+the collection isn't hardcoded), or replace
+the entire collection.
+
+DELETE is used to delete the entire collection.
+
+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.
+
+=== Single resource handler
+
+Skip this section if you are doing a collection.
+
+What methods should I implement?
+
+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.
+
+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.
+
+POST is used to update the resource.
+
+PUT is used to create a new resource (when it doesn't
+already exist) or replace the resource.
+
+DELETE is used to delete the resource.
+
+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.
+
+=== The resource
+
+Following the above discussion, implement the
+`allowed_methods` callback.
+
+Does the resource always exist? If it may not, implement
+the `resource_exists` callback.
+
+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 `is_authorized` callback.
+
+Do I need fine-grained access control? How do I determine
+that they are authorized access? Handle that in your
+`is_authorized` callback.
+
+Can access to a resource be forbidden regardless of access
+being authorized? A simple example of that is censorship
+of a resource. Implement the `forbidden` callback.
+
+Are 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 `uri_too_long`.
+
+=== Representations
+
+What media types do I provide? If text based, what charsets
+are provided? What languages do I provide?
+
+Implement the mandatory `content_types_provided`. Prefix
+the callbacks with `to_` for clarity. For example, `to_html`
+or `to_text`.
+
+Implement the `languages_provided` or `charsets_provided`
+callbacks if applicable.
+
+Is there any other header that may make the representation
+of the resource vary? Implement the `variances` callback.
+
+Depending on your choices for caching content, you may
+want to implement one or more of the `generate_etag`,
+`last_modified` and `expires` callbacks.
+
+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 `multiple_choices` callback.
+
+=== Redirections
+
+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 `previously_existed` callback.
+
+Was the resource moved, and is the move temporary? If
+it is explicitly temporary, for example due to maintenance,
+implement the `moved_temporarily` callback. Otherwise,
+implement the `moved_permanently` callback.
+
+=== The request
+
+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 `malformed_request`.
+
+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 `valid_entity_length`.
+
+Finally, take a look at the sections corresponding to the
+methods you are implementing.
+
+=== OPTIONS method
+
+Cowboy by default will send back a list of allowed methods.
+Do I need to add more information to the response? Implement
+the `options` method.
+
+=== GET and HEAD methods
+
+If you implement the methods GET and/or HEAD, you must
+implement one `ProvideResource` callback for each
+content-type returned by the `content_types_provided`
+callback.
+
+=== PUT, POST and PATCH methods
+
+If you implement the methods PUT, POST and/or PATCH,
+you must implement the `content_types_accepted` callback,
+and one `AcceptResource` callback for each content-type
+it returns. Prefix the `AcceptResource` callback names
+with `from_` for clarity. For example, `from_html` or
+`from_json`.
+
+Do we want to allow the POST method to create individual
+resources directly through their URI (like PUT)? Implement
+the `allow_missing_post` callback. It is recommended to
+explicitly use PUT in these cases instead.
+
+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
+`is_conflict` callback.
+
+=== DELETE methods
+
+If you implement the method DELETE, you must implement
+the `delete_resource` callback.
+
+When `delete_resource` 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
+`delete_completed` callback.
diff --git a/docs/en/cowboy/2.0/guide/resource_design/index.html b/docs/en/cowboy/2.0/guide/resource_design/index.html
new file mode 100644
index 00000000..94d6307e
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/resource_design/index.html
@@ -0,0 +1,350 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Designing a resource handler</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Designing a resource handler</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_the_service">The service</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_type_of_resource_handler">Type of resource handler</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Am I writing a handler for a collection of resources,
+or for a single resource?</p></div>
+<div class="paragraph"><p>The semantics for each of these are quite different.
+You should not mix collection and single resource in
+the same handler.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_collection_handler">Collection handler</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Skip this section if you are not doing a collection.</p></div>
+<div class="paragraph"><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&#8217;t. When the collection is hardcoded you
+can safely assume the resource always exists.</p></div>
+<div class="paragraph"><p>What methods should I implement?</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>HEAD and GET are used to retrieve the collection.
+If you allow GET, also allow HEAD as there&#8217;s no extra
+work required to make it work.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The next methods are more rarely allowed.</p></div>
+<div class="paragraph"><p>PUT is used to create a new collection (when
+the collection isn&#8217;t hardcoded), or replace
+the entire collection.</p></div>
+<div class="paragraph"><p>DELETE is used to delete the entire collection.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_single_resource_handler">Single resource handler</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Skip this section if you are doing a collection.</p></div>
+<div class="paragraph"><p>What methods should I implement?</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>HEAD and GET are used to retrieve the resource.
+If you allow GET, also allow HEAD as there&#8217;s no extra
+work required to make it work.</p></div>
+<div class="paragraph"><p>POST is used to update the resource.</p></div>
+<div class="paragraph"><p>PUT is used to create a new resource (when it doesn&#8217;t
+already exist) or replace the resource.</p></div>
+<div class="paragraph"><p>DELETE is used to delete the resource.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_resource">The resource</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Following the above discussion, implement the
+<code>allowed_methods</code> callback.</p></div>
+<div class="paragraph"><p>Does the resource always exist? If it may not, implement
+the <code>resource_exists</code> callback.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Are 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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_representations">Representations</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>What media types do I provide? If text based, what charsets
+are provided? What languages do I provide?</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Implement the <code>languages_provided</code> or <code>charsets_provided</code>
+callbacks if applicable.</p></div>
+<div class="paragraph"><p>Is there any other header that may make the representation
+of the resource vary? Implement the <code>variances</code> callback.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_redirections">Redirections</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_the_request">The request</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>May there be a request body? Will I know its size?
+What&#8217;s the maximum size of the request body I&#8217;m willing
+to accept? Implement <code>valid_entity_length</code>.</p></div>
+<div class="paragraph"><p>Finally, take a look at the sections corresponding to the
+methods you are implementing.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options_method">OPTIONS method</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_delete_methods">DELETE methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you implement the method DELETE, you must implement
+the <code>delete_resource</code> callback.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/resp.asciidoc b/docs/en/cowboy/2.0/guide/resp.asciidoc
new file mode 100644
index 00000000..1ffdfbd5
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/resp.asciidoc
@@ -0,0 +1,201 @@
+[[resp]]
+== Sending a response
+
+The Req object also allows you to send a response.
+
+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.
+
+You can also set headers or the response body in advance
+and Cowboy will use them when you finally do reply.
+
+=== Reply
+
+You can send a reply with no particular headers or body.
+Cowboy will make sure to send the mandatory headers with
+the response.
+
+[source,erlang]
+Req2 = cowboy_req:reply(200, Req).
+
+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.
+
+[source,erlang]
+----
+Req2 = cowboy_req:reply(303, [
+ {<<"location">>, <<"http://ninenines.eu">>}
+], Req).
+----
+
+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.
+
+[source,erlang]
+----
+Req2 = cowboy_req:reply(200, [
+ {<<"server">>, <<"yaws">>}
+], Req).
+----
+
+We also saw earlier how to force close the connection by
+overriding the connection header.
+
+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.
+
+[source,erlang]
+----
+Req2 = cowboy_req:reply(200, [
+ {<<"content-type">>, <<"text/plain">>}
+], "Hello world!", Req).
+----
+
+Here is the same example but sending HTML this time.
+
+[source,erlang]
+----
+Req2 = cowboy_req:reply(200, [
+ {<<"content-type">>, <<"text/html">>}
+], "<html><head>Hello world!</head><body><p>Hats off!</p></body></html>", Req).
+----
+
+Note that the reply is sent immediately.
+
+=== Chunked reply
+
+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.
+
+[source,erlang]
+Req2 = cowboy_req:chunked_reply(200, Req),
+cowboy_req:chunk("Hello...", Req2),
+cowboy_req:chunk("chunked...", Req2),
+cowboy_req:chunk("world!!", Req2).
+
+You should make sure to match on `ok` as an error may be
+returned.
+
+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.
+
+[source,erlang]
+----
+Req2 = cowboy_req:chunked_reply(200, [
+ {<<"content-type">>, <<"text/html">>}
+], Req),
+cowboy_req:chunk("<html><head>Hello world!</head>", Req2),
+cowboy_req:chunk("<body><p>Hats off!</p></body></html>", Req2).
+----
+
+Note that the reply and each chunk following it are sent
+immediately.
+
+=== Preset response headers
+
+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.
+
+[source,erlang]
+Req2 = cowboy_req:set_resp_header(<<"allow">>, "GET", Req).
+
+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.
+
+[source,erlang]
+cowboy_req:has_resp_header(<<"allow">>, Req).
+
+It will return `true` if the header is defined, and `false`
+otherwise.
+
+Finally, you can also delete a preset response header if
+needed. If you do, it will not be sent.
+
+[source,erlang]
+Req2 = cowboy_req:delete_resp_header(<<"allow">>, Req).
+
+=== Preset response body
+
+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.
+
+[source,erlang]
+Req2 = cowboy_req:set_resp_body("Hello world!", Req).
+
+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.
+
+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.
+
+[source,erlang]
+----
+F = fun (Socket, Transport) ->
+ Transport:send(Socket, "Hello world!")
+end,
+Req2 = cowboy_req:set_resp_body_fun(12, F, Req).
+----
+
+If you do not know the length of the body, you should use
+a chunked response body fun instead.
+
+[source,erlang]
+----
+F = fun (SendChunk) ->
+ Body = lists:duplicate(random:uniform(1024, $a)),
+ SendChunk(Body)
+end,
+Req2 = cowboy_req:set_resp_body_fun(chunked, F, Req).
+----
+
+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.
+
+[source,erlang]
+----
+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).
+----
+
+=== Sending files
+
+You can send files directly from disk without having to
+read them. Cowboy will use the `sendfile` 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.
+
+Again, it is recommended to set the size of the file if it
+can be known in advance.
+
+[source,erlang]
+----
+F = fun (Socket, Transport) ->
+ Transport:sendfile(Socket, "priv/styles.css")
+end,
+Req2 = cowboy_req:set_resp_body_fun(FileSize, F, Req).
+----
+
+Please see the Ranch guide for more information about
+sending files.
diff --git a/docs/en/cowboy/2.0/guide/resp/index.html b/docs/en/cowboy/2.0/guide/resp/index.html
new file mode 100644
index 00000000..0baaa4c9
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/resp/index.html
@@ -0,0 +1,357 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Sending a response</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Sending a response</span></h1>
+
+<div class="paragraph"><p>The Req object also allows you to send a response.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>You can also set headers or the response body in advance
+and Cowboy will use them when you finally do reply.</p></div>
+<div class="sect1">
+<h2 id="_reply">Reply</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">303</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"location"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"http://ninenines.eu"</span><span style="color: #990000">&gt;&gt;</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"server"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"yaws"</span><span style="color: #990000">&gt;&gt;</span>}
+], <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>We also saw earlier how to force close the connection by
+overriding the connection header.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/plain"</span><span style="color: #990000">&gt;&gt;</span>}
+], <span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Here is the same example but sending HTML this time.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>}
+], <span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that the reply is sent immediately.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_chunked_reply">Chunked reply</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunked_reply</span></span>(<span style="color: #993399">200</span>, <span style="color: #009900">Req</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #FF0000">"Hello..."</span>, <span style="color: #009900">Req2</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #FF0000">"chunked..."</span>, <span style="color: #009900">Req2</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #FF0000">"world!!"</span>, <span style="color: #009900">Req2</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You should make sure to match on <code>ok</code> as an error may be
+returned.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunked_reply</span></span>(<span style="color: #993399">200</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text/html"</span><span style="color: #990000">&gt;&gt;</span>}
+], <span style="color: #009900">Req</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #FF0000">"&lt;html&gt;&lt;head&gt;Hello world!&lt;/head&gt;"</span>, <span style="color: #009900">Req2</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:chunk</span></span>(<span style="color: #FF0000">"&lt;body&gt;&lt;p&gt;Hats off!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"</span>, <span style="color: #009900">Req2</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that the reply and each chunk following it are sent
+immediately.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_preset_response_headers">Preset response headers</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"GET"</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">cowboy_req:has_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>It will return <code>true</code> if the header is defined, and <code>false</code>
+otherwise.</p></div>
+<div class="paragraph"><p>Finally, you can also delete a preset response header if
+needed. If you do, it will not be sent.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:delete_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"allow"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_preset_response_body">Preset response body</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body</span></span>(<span style="color: #FF0000">"Hello world!"</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">F</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> (<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"Hello world!"</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body_fun</span></span>(<span style="color: #993399">12</span>, <span style="color: #009900">F</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If you do not know the length of the body, you should use
+a chunked response body fun instead.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">F</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> (<span style="color: #009900">SendChunk</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:duplicate</span></span>(<span style="font-weight: bold"><span style="color: #000000">random:uniform</span></span>(<span style="color: #993399">1024</span>, <span style="color: #FF0000">$a</span>)),
+ <span style="color: #009900">SendChunk</span>(<span style="color: #009900">Body</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body_fun</span></span>(<span style="color: #FF6600">chunked</span>, <span style="color: #009900">F</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">F</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> (<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">lists:duplicate</span></span>(<span style="font-weight: bold"><span style="color: #000000">random:uniform</span></span>(<span style="color: #993399">1024</span>, <span style="color: #FF0000">$a</span>)),
+ <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Body</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body_fun</span></span>(<span style="color: #009900">F</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_files">Sending files</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Again, it is recommended to set the size of the file if it
+can be known in advance.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">F</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span> (<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"priv/styles.css"</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
+<span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_body_fun</span></span>(<span style="color: #009900">FileSize</span>, <span style="color: #009900">F</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Please see the Ranch guide for more information about
+sending files.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/rest_cond.png b/docs/en/cowboy/2.0/guide/rest_cond.png
new file mode 100644
index 00000000..64cda347
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_cond.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_cond.svg b/docs/en/cowboy/2.0/guide/rest_cond.svg
new file mode 100644
index 00000000..542ae17d
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_conneg.png b/docs/en/cowboy/2.0/guide/rest_conneg.png
new file mode 100644
index 00000000..65ecdcf3
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_conneg.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_conneg.svg b/docs/en/cowboy/2.0/guide/rest_conneg.svg
new file mode 100644
index 00000000..247567a0
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_delete.png b/docs/en/cowboy/2.0/guide/rest_delete.png
new file mode 100644
index 00000000..56a861c0
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_delete.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_delete.svg b/docs/en/cowboy/2.0/guide/rest_delete.svg
new file mode 100644
index 00000000..2f5513cd
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_flowcharts.asciidoc b/docs/en/cowboy/2.0/guide/rest_flowcharts.asciidoc
new file mode 100644
index 00000000..b5697825
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_flowcharts.asciidoc
@@ -0,0 +1,248 @@
+[[rest_flowcharts]]
+== REST flowcharts
+
+This chapter will explain the REST handler state machine through
+a number of different diagrams.
+
+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.
+
+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.
+
+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.
+
+=== Start
+
+All requests start from here.
+
+image::rest_start.png[REST starting flowchart]
+
+A series of callbacks are called in succession to perform
+a general checkup of the service, the request line and
+request headers.
+
+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.
+
+The `known_methods` and `allowed_methods` callbacks
+return a list of methods. Cowboy then checks if the request
+method is in the list, and stops otherwise.
+
+The `is_authorized` 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.
+
+This diagram is immediately followed by either the
+"OPTIONS method" diagram when the request method is
+OPTIONS, or the "Content negotiation" diagram otherwise.
+
+=== OPTIONS method
+
+This diagram only applies to OPTIONS requests.
+
+image::rest_options.png[REST OPTIONS method flowchart]
+
+The `options` 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.
+
+If the `options` callback is not defined, Cowboy will
+send a response containing the list of allowed methods
+by default.
+
+=== Content negotiation
+
+This diagram applies to all request methods other than
+OPTIONS. It is executed right after the "Start" diagram
+is completed.
+
+image::rest_conneg.png[REST content negotiation flowchart]
+
+The purpose of these steps is to determine an appropriate
+representation to be sent back to the client.
+
+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.
+
+If a callback is not defined, Cowboy will select the
+content-type, language or charset that the client
+prefers.
+
+The `content_types_provided` 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.
+
+The selected content-type, language and charset are
+saved as meta values in the Req object. You *should*
+use the appropriate representation if you set a
+response body manually (alongside an error code,
+for example).
+
+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.
+
+=== GET and HEAD methods
+
+This diagram only applies to GET and HEAD requests.
+
+For a description of the `cond` step, please see
+the "Conditional requests" diagram.
+
+image::rest_get_head.png[REST GET/HEAD methods flowchart]
+
+When the resource exists, and the conditional steps
+succeed, the resource can be retrieved.
+
+Cowboy prepares the response by first retrieving
+metadata about the representation, then by calling
+the `ProvideResource` callback. This is the callback
+you defined for each content-types you returned from
+`content_types_provided`. This callback returns the body
+that will be sent back to the client, or a fun if the
+body must be streamed.
+
+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.
+
+The `moved_permanently` and `moved_temporarily` callbacks
+must return the new location of the resource if it was in
+fact moved.
+
+=== PUT, POST and PATCH methods
+
+This diagram only applies to PUT, POST and PATCH requests.
+
+For a description of the `cond` step, please see
+the "Conditional requests" diagram.
+
+image::rest_put_post_patch.png[REST PUT/POST/PATCH methods flowchart]
+
+When the resource exists, first the conditional steps
+are executed. When that succeeds, and the method is PUT,
+Cowboy will call the `is_conflict` callback. This function
+can be used to prevent potential race conditions, by locking
+the resource for example.
+
+Then all three methods reach the `content_types_accepted`
+step that we will describe in a few paragraphs.
+
+When the resource does not exist, and the method is PUT,
+Cowboy will check for conflicts and then move on to the
+`content_types_accepted` 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 `allow_missing_post` returns `true`, then Cowboy will
+move on to the `content_types_accepted` step. Otherwise
+the request processing ends there.
+
+The `moved_permanently` and `moved_temporarily` callbacks
+must return the new location of the resource if it was in
+fact moved.
+
+The `content_types_accepted` 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.
+
+This callback may return one of three different return
+values.
+
+If an error occurred while processing the request body,
+it must return `false` and Cowboy will send an
+appropriate error response.
+
+If the method is POST, then you may return `true` with
+an URI of where the resource has been created. This is
+especially useful for writing handlers for collections.
+
+Otherwise, return `true` 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.
+
+=== DELETE method
+
+This diagram only applies to DELETE requests.
+
+For a description of the `cond` step, please see
+the "Conditional requests" diagram.
+
+image::rest_delete.png[REST DELETE method flowchart]
+
+When the resource exists, and the conditional steps
+succeed, the resource can be deleted.
+
+Deleting the resource is a two steps process. First
+the callback `delete_resource` is executed. Use this
+callback to delete the resource.
+
+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.
+
+Cowboy will then call the `delete_completed` callback.
+If you know that the resource has been completely
+deleted from your system, including from caches, then
+you can return `true`. If any doubts persist, return
+`false`. Cowboy will assume `true` by default.
+
+To finish, Cowboy checks if you set a response body,
+and depending on that, sends the appropriate response.
+
+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.
+
+The `moved_permanently` and `moved_temporarily` callbacks
+must return the new location of the resource if it was in
+fact moved.
+
+=== Conditional requests
+
+This diagram applies to all request methods other than
+OPTIONS. It is executed right after the `resource_exists`
+callback, when the resource exists.
+
+image::rest_cond.png[REST conditional requests flowchart]
+
+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.
+
+If the condition fails, the request ends immediately
+without any retrieval or modification of the resource.
+
+The `generate_etag` and `last_modified` are called as
+needed. Cowboy will only call them once and then cache
+the results for subsequent use.
diff --git a/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html
new file mode 100644
index 00000000..c5ca894b
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_flowcharts/index.html
@@ -0,0 +1,380 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: REST flowcharts</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>REST flowcharts</span></h1>
+
+<div class="paragraph"><p>This chapter will explain the REST handler state machine through
+a number of different diagrams.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_start">Start</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All requests start from here.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_start.png" alt="REST starting flowchart" />
+</div>
+</div>
+<div class="paragraph"><p>A series of callbacks are called in succession to perform
+a general checkup of the service, the request line and
+request headers.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_options_method">OPTIONS method</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This diagram only applies to OPTIONS requests.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_options.png" alt="REST OPTIONS method flowchart" />
+</div>
+</div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>If the <code>options</code> callback is not defined, Cowboy will
+send a response containing the list of allowed methods
+by default.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_content_negotiation">Content negotiation</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This diagram applies to all request methods other than
+OPTIONS. It is executed right after the "Start" diagram
+is completed.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_conneg.png" alt="REST content negotiation flowchart" />
+</div>
+</div>
+<div class="paragraph"><p>The purpose of these steps is to determine an appropriate
+representation to be sent back to the client.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>If a callback is not defined, Cowboy will select the
+content-type, language or charset that the client
+prefers.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The selected content-type, language and charset are
+saved as meta values in the Req object. You <strong>should</strong>
+use the appropriate representation if you set a
+response body manually (alongside an error code,
+for example).</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_get_and_head_methods">GET and HEAD methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This diagram only applies to GET and HEAD requests.</p></div>
+<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
+the "Conditional requests" diagram.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_get_head.png" alt="REST GET/HEAD methods flowchart" />
+</div>
+</div>
+<div class="paragraph"><p>When the resource exists, and the conditional steps
+succeed, the resource can be retrieved.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_put_post_and_patch_methods">PUT, POST and PATCH methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This diagram only applies to PUT, POST and PATCH requests.</p></div>
+<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
+the "Conditional requests" diagram.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_put_post_patch.png" alt="REST PUT/POST/PATCH methods flowchart" />
+</div>
+</div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Then all three methods reach the <code>content_types_accepted</code>
+step that we will describe in a few paragraphs.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This callback may return one of three different return
+values.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_delete_method">DELETE method</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This diagram only applies to DELETE requests.</p></div>
+<div class="paragraph"><p>For a description of the <code>cond</code> step, please see
+the "Conditional requests" diagram.</p></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_delete.png" alt="REST DELETE method flowchart" />
+</div>
+</div>
+<div class="paragraph"><p>When the resource exists, and the conditional steps
+succeed, the resource can be deleted.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>To finish, Cowboy checks if you set a response body,
+and depending on that, sends the appropriate response.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_conditional_requests">Conditional requests</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="imageblock">
+<div class="content">
+<img src="../rest_cond.png" alt="REST conditional requests flowchart" />
+</div>
+</div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>If the condition fails, the request ends immediately
+without any retrieval or modification of the resource.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/rest_get_head.png b/docs/en/cowboy/2.0/guide/rest_get_head.png
new file mode 100644
index 00000000..efee892a
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_get_head.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_get_head.svg b/docs/en/cowboy/2.0/guide/rest_get_head.svg
new file mode 100644
index 00000000..c78e9399
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc b/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc
new file mode 100644
index 00000000..6bff18d7
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_handlers.asciidoc
@@ -0,0 +1,133 @@
+[[rest_handlers]]
+== REST handlers
+
+REST is implemented in Cowboy as a sub protocol. The request
+is handled as a state machine with many optional callbacks
+describing the resource and modifying the machine's behavior.
+
+The REST handler is the recommended way to handle HTTP requests.
+
+=== Initialization
+
+First, the `init/2` callback is called. This callback is common
+to all handlers. To use REST for the current request, this function
+must return a `cowboy_rest` tuple.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_rest, Req, #state{}}.
+----
+
+Cowboy will then switch to the REST protocol and start executing
+the state machine.
+
+After reaching the end of the flowchart, the `terminate/3` callback
+will be called if it is defined.
+
+=== Methods
+
+The REST component has code for handling the following HTTP methods:
+HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.
+
+Other methods can be accepted, however they have no specific callback
+defined for them at this time.
+
+=== Callbacks
+
+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.
+
+All callbacks take two arguments, the Req object and the State,
+and return a three-element tuple of the form `{Value, Req, State}`.
+
+All callbacks can also return `{stop, Req, State}` to stop execution
+of the request.
+
+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.
+
+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.
+
+[cols="<,^",options="header"]
+|===
+| Callback name | Default value
+| allowed_methods | `[<<"GET">>, <<"HEAD">>, <<"OPTIONS">>]`
+| allow_missing_post | `true`
+| charsets_provided | skip
+| content_types_accepted | none
+| content_types_provided | `$$[{{<<"text">>, <<"html">>, '*'}, to_html}]$$`
+| delete_completed | `true`
+| delete_resource | `false`
+| expires | `undefined`
+| forbidden | `false`
+| generate_etag | `undefined`
+| is_authorized | `true`
+| is_conflict | `false`
+| known_methods | `[<<"GET">>, <<"HEAD">>, <<"POST">>, <<"PUT">>, <<"PATCH">>, <<"DELETE">>, <<"OPTIONS">>]`
+| languages_provided | skip
+| last_modified | `undefined`
+| malformed_request | `false`
+| moved_permanently | `false`
+| moved_temporarily | `false`
+| multiple_choices | `false`
+| options | `ok`
+| previously_existed | `false`
+| resource_exists | `true`
+| service_available | `true`
+| uri_too_long | `false`
+| valid_content_headers | `true`
+| valid_entity_length | `true`
+| variances | `[]`
+|===
+
+As you can see, Cowboy tries to move on with the request whenever
+possible by using well thought out default values.
+
+In addition to these, there can be any number of user-defined
+callbacks that are specified through `content_types_accepted/2`
+and `content_types_provided/2`. They can take any name, however
+it is recommended to use a separate prefix for the callbacks of
+each function. For example, `from_html` and `to_html` 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.
+
+=== Meta data
+
+Cowboy will set informative meta values at various points of the
+execution. You can retrieve them using `cowboy_req:meta/{2,3}`.
+The values are defined in the following table.
+
+[cols="<,<",options="header"]
+|===
+| Meta key | Details
+| media_type | The content-type negotiated for the response entity.
+| language | The language negotiated for the response entity.
+| charset | The charset negotiated for the response entity.
+|===
+
+They can be used to send a proper body with the response to a
+request that used a method other than HEAD or GET.
+
+=== Response headers
+
+Cowboy will set response headers automatically over the execution
+of the REST code. They are listed in the following table.
+
+[cols="<,<",options="header"]
+|===
+| Header name | Details
+| content-language | Language used in the response body
+| content-type | Media type and charset of the response body
+| etag | Etag of the resource
+| expires | Expiration date of the resource
+| last-modified | Last modification date for the resource
+| location | Relative or absolute URI to the requested resource
+| vary | List of headers that may change the representation of the resource
+|===
diff --git a/docs/en/cowboy/2.0/guide/rest_handlers/index.html b/docs/en/cowboy/2.0/guide/rest_handlers/index.html
new file mode 100644
index 00000000..15282e5f
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_handlers/index.html
@@ -0,0 +1,231 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: REST handlers</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>REST handlers</span></h1>
+
+<div class="paragraph"><p>REST is implemented in Cowboy as a sub protocol. The request
+is handled as a state machine with many optional callbacks
+describing the resource and modifying the machine&#8217;s behavior.</p></div>
+<div class="paragraph"><p>The REST handler is the recommended way to handle HTTP requests.</p></div>
+<div class="sect1">
+<h2 id="_initialization">Initialization</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
+to all handlers. To use REST for the current request, this function
+must return a <code>cowboy_rest</code> tuple.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Cowboy will then switch to the REST protocol and start executing
+the state machine.</p></div>
+<div class="paragraph"><p>After reaching the end of the flowchart, the <code>terminate/3</code> callback
+will be called if it is defined.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_methods">Methods</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The REST component has code for handling the following HTTP methods:
+HEAD, GET, POST, PATCH, PUT, DELETE and OPTIONS.</p></div>
+<div class="paragraph"><p>Other methods can be accepted, however they have no specific callback
+defined for them at this time.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>All callbacks take two arguments, the Req object and the State,
+and return a three-element tuple of the form <code>{Value, Req, State}</code>.</p></div>
+<div class="paragraph"><p>All callbacks can also return <code>{stop, Req, State}</code> to stop execution
+of the request.</p></div>
+<div class="paragraph"><p>The following table summarizes the callbacks and their default values.
+If the callback isn&#8217;t defined, then the default value will be used.
+Please look at the flowcharts to find out the result of each return
+value.</p></div>
+<div class="paragraph"><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></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Callback name </th>
+<th align="center" valign="top"> Default value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">allowed_methods</p></td>
+<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">allow_missing_post</p></td>
+<td align="center" valign="top"><p class="table"><code>true</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">charsets_provided</p></td>
+<td align="center" valign="top"><p class="table">skip</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">content_types_accepted</p></td>
+<td align="center" valign="top"><p class="table">none</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">content_types_provided</p></td>
+<td align="center" valign="top"><p class="table">`$$[</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/rest_options.png b/docs/en/cowboy/2.0/guide/rest_options.png
new file mode 100644
index 00000000..90fd6f06
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_options.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_options.svg b/docs/en/cowboy/2.0/guide/rest_options.svg
new file mode 100644
index 00000000..496c050c
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_principles.asciidoc b/docs/en/cowboy/2.0/guide/rest_principles.asciidoc
new file mode 100644
index 00000000..66939cb7
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_principles.asciidoc
@@ -0,0 +1,160 @@
+[[rest_principles]]
+== REST principles
+
+This chapter will attempt to define the concepts behind REST
+and explain what makes a service RESTful.
+
+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.
+
+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
+http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm[Roy T. Fielding's dissertation]
+as it does a great job explaining where it comes from and
+what it achieves.
+
+=== REST architecture
+
+REST is a *client-server* 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.
+
+REST is *stateless*. 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.
+
+REST is *cacheable*. The client, the server and any intermediary
+components can all cache resources in order to improve performance.
+
+REST provides a *uniform interface* 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.
+
+REST is a *layered system*. 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.
+
+REST optionally provides *code on demand*. 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.
+
+=== Resources and resource identifiers
+
+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.
+
+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.
+
+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.
+
+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".
+
+=== Resource representations
+
+The representation of a resource is a sequence of bytes associated
+with metadata.
+
+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.
+
+The representation metadata gives information about the
+representation, such as its media type, the date of last
+modification, or even a checksum.
+
+Resource metadata could be link to related resources or
+information about additional representations of the resource.
+
+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.
+
+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.
+
+=== Self-descriptive messages
+
+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.
+
+The media type is often an IANA registered media type, like
+`text/html` or `image/png`, 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.
+
+This means that you can create your own media types, like
+`application/x-mine`, and that as long as you write the
+specifications for it and that both endpoints agree about
+it then the constraint is respected.
+
+=== Hypermedia as the engine of application state
+
+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.
+
+To give a simple example, if your service only works with
+the `application/json` 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.
+
+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.
+
+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.
diff --git a/docs/en/cowboy/2.0/guide/rest_principles/index.html b/docs/en/cowboy/2.0/guide/rest_principles/index.html
new file mode 100644
index 00000000..1b4335dd
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_principles/index.html
@@ -0,0 +1,289 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: REST principles</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>REST principles</span></h1>
+
+<div class="paragraph"><p>This chapter will attempt to define the concepts behind REST
+and explain what makes a service RESTful.</p></div>
+<div class="paragraph"><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&#8217;s highly misguided at best.</p></div>
+<div class="paragraph"><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&#8217;s dissertation</a>
+as it does a great job explaining where it comes from and
+what it achieves.</p></div>
+<div class="sect1">
+<h2 id="_rest_architecture">REST architecture</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>REST is a <strong>client-server</strong> 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></div>
+<div class="paragraph"><p>REST is <strong>stateless</strong>. 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&#8217;s side. If access to a resource
+requires authentication, then the client needs to authenticate
+itself with every request.</p></div>
+<div class="paragraph"><p>REST is <strong>cacheable</strong>. The client, the server and any intermediary
+components can all cache resources in order to improve performance.</p></div>
+<div class="paragraph"><p>REST provides a <strong>uniform interface</strong> 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></div>
+<div class="paragraph"><p>REST is a <strong>layered system</strong>. 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></div>
+<div class="paragraph"><p>REST optionally provides <strong>code on demand</strong>. 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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_resources_and_resource_identifiers">Resources and resource identifiers</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>A resource is a conceptual mapping to a set of entities. The set of
+entities evolves over time; a resource doesn&#8217;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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_resource_representations">Resource representations</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The representation of a resource is a sequence of bytes associated
+with metadata.</p></div>
+<div class="paragraph"><p>The metadata comes as a list of key-value pairs, where the name
+corresponds to a standard that defines the value&#8217;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></div>
+<div class="paragraph"><p>The representation metadata gives information about the
+representation, such as its media type, the date of last
+modification, or even a checksum.</p></div>
+<div class="paragraph"><p>Resource metadata could be link to related resources or
+information about additional representations of the resource.</p></div>
+<div class="paragraph"><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&#8217;t restricted to caching. We may,
+for example, want to store a new representation of a resource
+only if it wasn&#8217;t modified since we first retrieved it.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_self_descriptive_messages">Self-descriptive messages</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hypermedia_as_the_engine_of_application_state">Hypermedia as the engine of application state</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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&#8217;t RESTful. This is the case
+for the majority of self-proclaimed REST services.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/rest_put_post_patch.png b/docs/en/cowboy/2.0/guide/rest_put_post_patch.png
new file mode 100644
index 00000000..4afca9e9
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_put_post_patch.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_put_post_patch.svg b/docs/en/cowboy/2.0/guide/rest_put_post_patch.svg
new file mode 100644
index 00000000..263cc942
--- /dev/null
+++ b/docs/en/cowboy/2.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/docs/en/cowboy/2.0/guide/rest_start.png b/docs/en/cowboy/2.0/guide/rest_start.png
new file mode 100644
index 00000000..1f1e312e
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_start.png
Binary files differ
diff --git a/docs/en/cowboy/2.0/guide/rest_start.svg b/docs/en/cowboy/2.0/guide/rest_start.svg
new file mode 100644
index 00000000..076c6195
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/rest_start.svg
@@ -0,0 +1,1356 @@
+<?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_start.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 />
+ </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="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>
+ <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"
+ 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">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.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">...</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>
+ <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>
+ <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" />
+ <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">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/docs/en/cowboy/2.0/guide/routing.asciidoc b/docs/en/cowboy/2.0/guide/routing.asciidoc
new file mode 100644
index 00000000..6ac2ebde
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/routing.asciidoc
@@ -0,0 +1,224 @@
+[[routing]]
+== Routing
+
+Cowboy does nothing by default.
+
+To make Cowboy useful, you need to map URLs to Erlang modules that will
+handle the requests. This is called routing.
+
+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.
+
+Routing rules are given per host. Cowboy will first match on the host,
+and then try to find a matching path.
+
+Routes need to be compiled before they can be used by Cowboy.
+
+=== Structure
+
+The general structure for the routes is defined as follow.
+
+[source,erlang]
+Routes = [Host1, Host2, ... HostN].
+
+Each host contains matching rules for the host along with optional
+constraints, and a list of routes for the path component.
+
+[source,erlang]
+Host1 = {HostMatch, PathsList}.
+Host2 = {HostMatch, Constraints, PathsList}.
+
+The list of routes for the path component is defined similar to the
+list of hosts.
+
+[source,erlang]
+PathsList = [Path1, Path2, ... PathN].
+
+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.
+
+[source,erlang]
+Path1 = {PathMatch, Handler, Opts}.
+Path2 = {PathMatch, Constraints, Handler, Opts}.
+
+Continue reading to learn more about the match syntax and the optional
+constraints.
+
+=== Match syntax
+
+The match syntax is used to associate host names and paths with their
+respective handlers.
+
+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.
+
+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 `string()` or a `binary()`.
+
+[source,erlang]
+----
+PathMatch1 = "/".
+PathMatch2 = "/path/to/resource".
+
+HostMatch1 = "cowboy.example.org".
+----
+
+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.
+
+[source,erlang]
+PathMatch2 = "/path/to/resource".
+PathMatch3 = "/path/to/resource/".
+
+Hosts with and without a trailing dot are equivalent for routing.
+Similarly, hosts with and without a leading dot are also equivalent.
+
+[source,erlang]
+HostMatch1 = "cowboy.example.org".
+HostMatch2 = "cowboy.example.org.".
+HostMatch3 = ".cowboy.example.org".
+
+It is possible to extract segments of the host and path and to store
+the values in the `Req` object for later use. We call these kind of
+values bindings.
+
+The syntax for bindings is very simple. A segment that begins with
+the `:` 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.
+
+[source,erlang]
+PathMatch = "/hats/:name/prices".
+HostMatch = ":subdomain.example.org".
+
+If these two end up matching when routing, you will end up with two
+bindings defined, `subdomain` and `name`, each containing the
+segment value where they were defined. For example, the URL
+`http://test.example.org/hats/wild_cowboy_legendary/prices` will
+result in having the value `test` bound to the name `subdomain`
+and the value `wild_cowboy_legendary` bound to the name `name`.
+They can later be retrieved using `cowboy_req:binding/{2,3}`. The
+binding name must be given as an atom.
+
+There is a special binding name you can use to mimic the underscore
+variable in Erlang. Any match against the `_` binding will succeed
+but the data will be discarded. This is especially useful for
+matching against many domain names in one go.
+
+[source,erlang]
+HostMatch = "ninenines.:_".
+
+Similarly, it is possible to have optional segments. Anything
+between brackets is optional.
+
+[source,erlang]
+PathMatch = "/hats/[page/:number]".
+HostMatch = "[www.]ninenines.eu".
+
+You can also have imbricated optional segments.
+
+[source,erlang]
+PathMatch = "/hats/[page/[:number]]".
+
+You can retrieve the rest of the host or path using `[...]`.
+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
+`cowboy_req:host_info/1` and `cowboy_req:path_info/1` respectively.
+They will be represented as a list of segments.
+
+[source,erlang]
+PathMatch = "/hats/[...]".
+HostMatch = "[...]ninenines.eu".
+
+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.
+
+[source,erlang]
+PathMatch = "/hats/:name/:name".
+
+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.
+
+[source,erlang]
+PathMatch = "/hats/:name/[:name]".
+
+If a binding is defined in both the host and path, then they must
+also share the same value.
+
+[source,erlang]
+PathMatch = "/:user/[...]".
+HostMatch = ":user.github.com".
+
+Finally, there are two special match values that can be used. The
+first is the atom `'_'` which will match any host or path.
+
+[source,erlang]
+PathMatch = '_'.
+HostMatch = '_'.
+
+The second is the special host match `"*"` which will match the
+wildcard path, generally used alongside the `OPTIONS` method.
+
+[source,erlang]
+HostMatch = "*".
+
+=== Constraints
+
+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. If the match fails, then Cowboy
+tries the next route in the list.
+
+The format used for constraints is the same as match functions in
+`cowboy_req`: they are provided as a list of fields which may have
+one or more constraints. While the router accepts the same format,
+it will skip fields with no constraints and will also ignore default
+values, if any.
+
+Read more about xref:constraints[constraints].
+
+=== Compilation
+
+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.
+
+This can be done with a simple call to `cowboy_router:compile/1`.
+
+[source,erlang]
+----
+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}]}]
+).
+----
+
+Note that this function will return `{error, badarg}` if the structure
+given is incorrect.
+
+=== Live update
+
+You can use the `cowboy:set_env/3` function for updating the dispatch
+list used by routing. This will apply to all new connections accepted
+by the listener.
+
+[source,erlang]
+cowboy:set_env(my_http_listener, dispatch, cowboy_router:compile(Dispatch)).
+
+Note that you need to compile the routes before updating.
diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html
new file mode 100644
index 00000000..032d8214
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/routing/index.html
@@ -0,0 +1,397 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Routing</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Routing</span></h1>
+
+<div class="paragraph"><p>Cowboy does nothing by default.</p></div>
+<div class="paragraph"><p>To make Cowboy useful, you need to map URLs to Erlang modules that will
+handle the requests. This is called routing.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Routing rules are given per host. Cowboy will first match on the host,
+and then try to find a matching path.</p></div>
+<div class="paragraph"><p>Routes need to be compiled before they can be used by Cowboy.</p></div>
+<div class="sect1">
+<h2 id="_structure">Structure</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The general structure for the routes is defined as follow.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Routes</span> <span style="color: #990000">=</span> [<span style="color: #009900">Host1</span>, <span style="color: #009900">Host2</span>, <span style="color: #990000">...</span> <span style="color: #009900">HostN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Each host contains matching rules for the host along with optional
+constraints, and a list of routes for the path component.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Host1</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span>
+<span style="color: #009900">Host2</span> <span style="color: #990000">=</span> {<span style="color: #009900">HostMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">PathsList</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The list of routes for the path component is defined similar to the
+list of hosts.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathsList</span> <span style="color: #990000">=</span> [<span style="color: #009900">Path1</span>, <span style="color: #009900">Path2</span>, <span style="color: #990000">...</span> <span style="color: #009900">PathN</span>]<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Path1</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span>
+<span style="color: #009900">Path2</span> <span style="color: #990000">=</span> {<span style="color: #009900">PathMatch</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">Opts</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Continue reading to learn more about the match syntax and the optional
+constraints.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_match_syntax">Match syntax</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The match syntax is used to associate host names and paths with their
+respective handlers.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/"</span><span style="color: #990000">.</span>
+<span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
+
+<span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource"</span><span style="color: #990000">.</span>
+<span style="color: #009900">PathMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/path/to/resource/"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Hosts with and without a trailing dot are equivalent for routing.
+Similarly, hosts with and without a leading dot are also equivalent.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HostMatch1</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org"</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch2</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"cowboy.example.org."</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch3</span> <span style="color: #990000">=</span> <span style="color: #FF0000">".cowboy.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/prices"</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":subdomain.example.org"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"ninenines.:_"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Similarly, it is possible to have optional segments. Anything
+between brackets is optional.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/:number]"</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[www.]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also have imbricated optional segments.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[page/[:number]]"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/[...]"</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"[...]ninenines.eu"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/:name"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/hats/:name/[:name]"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If a binding is defined in both the host and path, then they must
+also share the same value.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"/:user/[...]"</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">":user.github.com"</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PathMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span>
+<span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF6600">'_'</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">HostMatch</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"*"</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_constraints">Constraints</h2>
+<div class="sectionbody">
+<div class="paragraph"><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. If the match fails, then Cowboy
+tries the next route in the list.</p></div>
+<div class="paragraph"><p>The format used for constraints is the same as match functions in
+<code>cowboy_req</code>: they are provided as a list of fields which may have
+one or more constraints. While the router accepts the same format,
+it will skip fields with no constraints and will also ignore default
+values, if any.</p></div>
+<div class="paragraph"><p>Read more about <a href="../constraints">constraints</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_compilation">Compilation</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This can be done with a simple call to <code>cowboy_router:compile/1</code>.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([
+ <span style="font-style: italic"><span style="color: #9A1900">%% {HostMatch, list({PathMatch, Handler, Opts})}</span></span>
+ {<span style="color: #FF6600">'_'</span>, [{<span style="color: #FF6600">'_'</span>, <span style="color: #FF6600">my_handler</span>, []}]}
+]),
+<span style="font-style: italic"><span style="color: #9A1900">%% Name, NbAcceptors, TransOpts, ProtoOpts</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy:start_http</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #993399">100</span>,
+ [{<span style="color: #FF6600">port</span>, <span style="color: #993399">8080</span>}],
+ [{<span style="color: #FF6600">env</span>, [{<span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>}]}]
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that this function will return <code>{error, badarg}</code> if the structure
+given is incorrect.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_live_update">Live update</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #FF6600">dispatch</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>(<span style="color: #009900">Dispatch</span>))<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that you need to compile the routes before updating.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/static_files.asciidoc b/docs/en/cowboy/2.0/guide/static_files.asciidoc
new file mode 100644
index 00000000..39197a88
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/static_files.asciidoc
@@ -0,0 +1,171 @@
+[[static_files]]
+== Static files
+
+Cowboy comes with a special handler built as a REST handler
+and designed specifically for serving static files. It is
+provided as a convenience and provides a quick solution for
+serving files during development.
+
+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.
+
+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.
+
+To use the static file handler, simply add routes for it
+with the appropriate options.
+
+=== Serve one file
+
+You can use the static handler to serve one specific file
+from an application's private directory. This is particularly
+useful to serve an 'index.html' file when the client requests
+the `/` path, for example. The path configured is relative
+to the given application's private directory.
+
+The following rule will serve the file 'static/index.html'
+from the application `my_app`'s priv directory whenever the
+path `/` is accessed.
+
+[source,erlang]
+{"/", cowboy_static, {priv_file, my_app, "static/index.html"}}
+
+You can also specify the absolute path to a file, or the
+path to the file relative to the current directory.
+
+[source,erlang]
+{"/", cowboy_static, {file, "/var/www/index.html"}}
+
+=== Serve all files from a directory
+
+You can also use the static handler to serve all files that
+can be found in the configured directory. The handler will
+use the `path_info` information to resolve the file location,
+which means that your route must end with a `[...]` pattern
+for it to work. All files are served, including the ones that
+may be found in subfolders.
+
+You can specify the directory relative to an application's
+private directory.
+
+The following rule will serve any file found in the application
+`my_app`'s priv directory inside the `static/assets` folder
+whenever the requested path begins with `/assets/`.
+
+[source,erlang]
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets"}}
+
+You can also specify the absolute path to the directory or
+set it relative to the current directory.
+
+[source,erlang]
+{"/assets/[...]", cowboy_static, {dir, "/var/www/assets"}}
+
+=== Customize the mimetype detection
+
+By default, Cowboy will attempt to recognize the mimetype
+of your static files by looking at the extension.
+
+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.
+
+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.
+
+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.
+
+[source,erlang]
+----
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets",
+ [{mimetypes, cow_mimetypes, web}]}}
+----
+
+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.
+
+To use the function that will detect almost any mimetype,
+the following configuration will do.
+
+[source,erlang]
+----
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets",
+ [{mimetypes, cow_mimetypes, all}]}}
+----
+
+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.
+
+[source,erlang]
+----
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets",
+ [{mimetypes, Module, Function}]}}
+----
+
+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 `{<<"application">>, <<"octet-stream">>, []}`.
+
+When the static handler fails to find the extension in the
+list, it will send the file as `application/octet-stream`.
+A browser receiving such file will attempt to download it
+directly to disk.
+
+Finally, the mimetype can be hard-coded for all files.
+This is especially useful in combination with the `file`
+and `priv_file` options as it avoids needless computation.
+
+[source,erlang]
+----
+{"/", cowboy_static, {priv_file, my_app, "static/index.html",
+ [{mimetypes, {<<"text">>, <<"html">>, []}}]}}
+----
+
+=== Generate an etag
+
+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.
+
+You can however change the way the etag is calculated.
+
+[source,erlang]
+----
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets",
+ [{etag, Module, Function}]}}
+----
+
+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.
+
+You can also completely disable etag handling.
+
+[source,erlang]
+----
+{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets",
+ [{etag, false}]}}
+----
diff --git a/docs/en/cowboy/2.0/guide/static_files/index.html b/docs/en/cowboy/2.0/guide/static_files/index.html
new file mode 100644
index 00000000..6ef9d782
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/static_files/index.html
@@ -0,0 +1,316 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Static files</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Static files</span></h1>
+
+<div class="paragraph"><p>Cowboy comes with a special handler built as a REST handler
+and designed specifically for serving static files. It is
+provided as a convenience and provides a quick solution for
+serving files during development.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>To use the static file handler, simply add routes for it
+with the appropriate options.</p></div>
+<div class="sect1">
+<h2 id="_serve_one_file">Serve one file</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can use the static handler to serve one specific file
+from an application&#8217;s private directory. This is particularly
+useful to serve an <em>index.html</em> file when the client requests
+the <code>/</code> path, for example. The path configured is relative
+to the given application&#8217;s private directory.</p></div>
+<div class="paragraph"><p>The following rule will serve the file <em>static/index.html</em>
+from the application <code>my_app</code>'s priv directory whenever the
+path <code>/</code> is accessed.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>}}</tt></pre></div></div>
+<div class="paragraph"><p>You can also specify the absolute path to a file, or the
+path to the file relative to the current directory.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">file</span>, <span style="color: #FF0000">"/var/www/index.html"</span>}}</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_serve_all_files_from_a_directory">Serve all files from a directory</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>You can specify the directory relative to an application&#8217;s
+private directory.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>}}</tt></pre></div></div>
+<div class="paragraph"><p>You can also specify the absolute path to the directory or
+set it relative to the current directory.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">dir</span>, <span style="color: #FF0000">"/var/www/assets"</span>}}</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_customize_the_mimetype_detection">Customize the mimetype detection</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>By default, Cowboy will attempt to recognize the mimetype
+of your static files by looking at the extension.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
+ [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">web</span>}]}}</tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>To use the function that will detect almost any mimetype,
+the following configuration will do.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
+ [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #FF6600">cow_mimetypes</span>, <span style="color: #FF6600">all</span>}]}}</tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
+ [{<span style="color: #FF6600">mimetypes</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
+<div class="paragraph"><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&#8217;t figure out the mimetype,
+then it should return <code>{&lt;&lt;"application"&gt;&gt;, &lt;&lt;"octet-stream"&gt;&gt;, []}</code>.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_file</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/index.html"</span>,
+ [{<span style="color: #FF6600">mimetypes</span>, {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"text"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"html"</span><span style="color: #990000">&gt;&gt;</span>, []}}]}}</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_generate_an_etag">Generate an etag</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>You can however change the way the etag is calculated.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
+ [{<span style="color: #FF6600">etag</span>, <span style="color: #009900">Module</span>, <span style="color: #009900">Function</span>}]}}</tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>You can also completely disable etag handling.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF0000">"/assets/[...]"</span>, <span style="color: #FF6600">cowboy_static</span>, {<span style="color: #FF6600">priv_dir</span>, <span style="color: #FF6600">my_app</span>, <span style="color: #FF0000">"static/assets"</span>,
+ [{<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}]}}</tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/sub_protocols.asciidoc b/docs/en/cowboy/2.0/guide/sub_protocols.asciidoc
new file mode 100644
index 00000000..63fd52be
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/sub_protocols.asciidoc
@@ -0,0 +1,68 @@
+[[sub_protocols]]
+== Sub protocols
+
+Sub protocols are used for creating new types of handlers that
+provide extra functionality in a reusable way. Cowboy uses this
+mechanism to provide its loop, REST and Websocket handlers.
+
+This chapter will explain how to create your own sub protocols
+and handler types.
+
+=== Usage
+
+To switch to a sub protocol, the `init/2` callback must return
+the name of the sub protocol module. Everything past this point
+is handled by the sub protocol.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_websocket, Req, #state{}}.
+----
+
+The return value may also have a `Timeout` value and/or the
+atom `hibernate`. These options are useful for long living
+connections. When they are not provided, the timeout value
+defaults to `infinity` and the hibernate value to `run`.
+
+The following snippet switches to the `my_protocol` sub
+protocol, sets the timeout value to 5 seconds and enables
+hibernation:
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {my_protocol, Req, #state{}, 5000, hibernate}.
+----
+
+If a sub protocol does not make use of these options, it should
+crash if it receives anything other than the default values.
+
+=== Upgrade
+
+After the `init/2` function returns, Cowboy will then call the
+`upgrade/6` function. This is the only callback defined by the
+`cowboy_sub_protocol` behavior.
+
+The function is named `upgrade` because it mimics the mechanism
+of HTTP protocol upgrades. For some sub protocols, like Websocket,
+an actual upgrade is performed. For others, like REST, this is
+only an upgrade at Cowboy's level and the client has nothing to
+do about it.
+
+The upgrade callback receives the Req object, the middleware
+environment, the handler and its options, and the aforementioned
+timeout and hibernate values.
+
+[source,erlang]
+----
+upgrade(Req, Env, Handler, HandlerOpts, Timeout, Hibernate) ->
+ %% Sub protocol code here.
+----
+
+This callback is expected to behave like a middleware and to
+return an updated environment and Req object.
+
+Sub protocols are expected to call the `cowboy_handler:terminate/4`
+function when they terminate. This function will make sure that
+the optional `terminate/3` callback is called, if present.
diff --git a/docs/en/cowboy/2.0/guide/sub_protocols/index.html b/docs/en/cowboy/2.0/guide/sub_protocols/index.html
new file mode 100644
index 00000000..c75da6a4
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/sub_protocols/index.html
@@ -0,0 +1,206 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Sub protocols</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Sub protocols</span></h1>
+
+<div class="paragraph"><p>Sub protocols are used for creating new types of handlers that
+provide extra functionality in a reusable way. Cowboy uses this
+mechanism to provide its loop, REST and Websocket handlers.</p></div>
+<div class="paragraph"><p>This chapter will explain how to create your own sub protocols
+and handler types.</p></div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To switch to a sub protocol, the <code>init/2</code> callback must return
+the name of the sub protocol module. Everything past this point
+is handled by the sub protocol.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The return value may also have a <code>Timeout</code> value and/or the
+atom <code>hibernate</code>. These options are useful for long living
+connections. When they are not provided, the timeout value
+defaults to <code>infinity</code> and the hibernate value to <code>run</code>.</p></div>
+<div class="paragraph"><p>The following snippet switches to the <code>my_protocol</code> sub
+protocol, sets the timeout value to 5 seconds and enables
+hibernation:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">my_protocol</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}, <span style="color: #993399">5000</span>, <span style="color: #FF6600">hibernate</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If a sub protocol does not make use of these options, it should
+crash if it receives anything other than the default values.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_upgrade">Upgrade</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>After the <code>init/2</code> function returns, Cowboy will then call the
+<code>upgrade/6</code> function. This is the only callback defined by the
+<code>cowboy_sub_protocol</code> behavior.</p></div>
+<div class="paragraph"><p>The function is named <code>upgrade</code> because it mimics the mechanism
+of HTTP protocol upgrades. For some sub protocols, like Websocket,
+an actual upgrade is performed. For others, like REST, this is
+only an upgrade at Cowboy&#8217;s level and the client has nothing to
+do about it.</p></div>
+<div class="paragraph"><p>The upgrade callback receives the Req object, the middleware
+environment, the handler and its options, and the aforementioned
+timeout and hibernate values.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">upgrade</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">Env</span>, <span style="color: #009900">Handler</span>, <span style="color: #009900">HandlerOpts</span>, <span style="color: #009900">Timeout</span>, <span style="color: #009900">Hibernate</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-style: italic"><span style="color: #9A1900">%% Sub protocol code here.</span></span></tt></pre></div></div>
+<div class="paragraph"><p>This callback is expected to behave like a middleware and to
+return an updated environment and Req object.</p></div>
+<div class="paragraph"><p>Sub protocols are expected to call the <code>cowboy_handler:terminate/4</code>
+function when they terminate. This function will make sure that
+the optional <code>terminate/3</code> callback is called, if present.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/ws_handlers.asciidoc b/docs/en/cowboy/2.0/guide/ws_handlers.asciidoc
new file mode 100644
index 00000000..9ddddf4c
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/ws_handlers.asciidoc
@@ -0,0 +1,196 @@
+[[ws_handlers]]
+== Handling Websocket connections
+
+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.
+
+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.
+
+=== Initialization
+
+First, the `init/2` callback is called. This callback is common
+to all handlers. To establish a Websocket connection, this function
+must return a `ws` tuple.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_websocket, Req, #state{}}.
+----
+
+Upon receiving this tuple, Cowboy will switch to the code
+that handles Websocket connections and perform the handshake
+immediately.
+
+If the sec-websocket-protocol header was sent with the request
+for establishing a Websocket connection, then the Websocket
+handler *must* 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.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ case cowboy_req:parse_header(<<"sec-websocket-protocol">>, Req) of
+ undefined ->
+ {ok, Req, #state{}};
+ Subprotocols ->
+ case lists:keymember(<<"mychat2">>, 1, Subprotocols) of
+ true ->
+ Req2 = cowboy_req:set_resp_header(<<"sec-websocket-protocol">>,
+ <<"mychat2">>, Req),
+ {ok, Req2, #state{}};
+ false ->
+ {stop, Req, undefined}
+ end
+ end.
+----
+
+It is not recommended to wait too long inside the `init/2`
+function. Any extra initialization may be done after returning by
+sending yourself a message before doing anything. Any message sent
+to `self()` from `init/2` is guaranteed to arrive before
+any frames from the client.
+
+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.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ self() ! post_init,
+ %% Register process here...
+ {cowboy_websocket, Req, #state{}}.
+
+websocket_info(post_init, Req, State) ->
+ %% Perform post_init initialization here...
+ {ok, Req, State}.
+----
+
+=== Handling frames from the client
+
+Cowboy will call `websocket_handle/3` 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.
+
+The handler can decide to send frames to the socket, stop
+or just continue without sending anything.
+
+The following snippet echoes back any text frame received and
+ignores all others.
+
+[source,erlang]
+----
+websocket_handle(Frame = {text, _}, Req, State) ->
+ {reply, Frame, Req, State};
+websocket_handle(_Frame, Req, State) ->
+ {ok, Req, State}.
+----
+
+=== Handling Erlang messages
+
+Cowboy will call `websocket_info/3` whenever an Erlang message
+arrives.
+
+The handler can decide to send frames to the socket, stop
+or just continue without sending anything.
+
+The following snippet forwards any `log` message to the socket
+and ignores all others.
+
+[source,erlang]
+----
+websocket_info({log, Text}, Req, State) ->
+ {reply, {text, Text}, Req, State};
+websocket_info(_Info, Req, State) ->
+ {ok, Req, State}.
+----
+
+=== Sending frames to the socket
+
+Cowboy allows sending either a single frame or a list of
+frames to the socket, in which case the frames are sent
+sequentially. Any frame can be sent: text, binary, ping,
+pong or close frames.
+
+The following example sends three frames using a single `reply`
+tuple.
+
+[source,erlang]
+----
+websocket_info(hello_world, Req, State) ->
+ {reply, [
+ {text, "Hello"},
+ {text, <<"world!">>},
+ {binary, <<0:8000>>}
+ ], Req, State};
+%% More websocket_info/3 clauses here...
+----
+
+Note that the payload for text and binary frames is of type
+`iodata()`, meaning it can be either a `binary()` or an
+`iolist()`.
+
+Sending a `close` 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.
+
+=== Ping and timeout
+
+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!
+
+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.
+
+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.
+
+A good timeout value is 60 seconds.
+
+[source,erlang]
+----
+init(Req, _Opts) ->
+ {cowboy_websocket, Req, #state{}, 60000}.
+----
+
+This value cannot be changed once it is set. It defaults to
+`infinity`.
+
+=== Hibernate
+
+Most tuples returned from handler callbacks can include an
+extra value `hibernate`. After doing any necessary operations
+following the return of the callback, Cowboy will hibernate
+the process.
+
+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.
+
+=== Supporting older browsers
+
+Unfortunately Websocket is a relatively recent technology,
+which means that not all browsers support it. A library like
+https://github.com/ninenines/bullet[Bullet] can be used to
+emulate Websocket connections on older browsers.
diff --git a/docs/en/cowboy/2.0/guide/ws_handlers/index.html b/docs/en/cowboy/2.0/guide/ws_handlers/index.html
new file mode 100644
index 00000000..4bdd00d9
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/ws_handlers/index.html
@@ -0,0 +1,339 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Handling Websocket connections</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Handling Websocket connections</span></h1>
+
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="sect1">
+<h2 id="_initialization">Initialization</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>First, the <code>init/2</code> callback is called. This callback is common
+to all handlers. To establish a Websocket connection, this function
+must return a <code>ws</code> tuple.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Upon receiving this tuple, Cowboy will switch to the code
+that handles Websocket connections and perform the handshake
+immediately.</p></div>
+<div class="paragraph"><p>If the sec-websocket-protocol header was sent with the request
+for establishing a Websocket connection, then the Websocket
+handler <strong>must</strong> 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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:parse_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ <span style="color: #000080">undefined</span> <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}};
+ <span style="color: #009900">Subprotocols</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">lists:keymember</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mychat2"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #993399">1</span>, <span style="color: #009900">Subprotocols</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ <span style="color: #000080">true</span> <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req2</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>,
+ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"mychat2"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req2</span>, <span style="color: #008080">#state</span>{}};
+ <span style="color: #000080">false</span> <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #000080">undefined</span>}
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span>
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>It is not recommended to wait too long inside the <code>init/2</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>init/2</code> is guaranteed to arrive before
+any frames from the client.</p></div>
+<div class="paragraph"><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></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">self</span></span>() <span style="color: #990000">!</span> <span style="color: #FF6600">post_init</span>,
+ <span style="font-style: italic"><span style="color: #9A1900">%% Register process here...</span></span>
+ {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}}<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #FF6600">post_init</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-style: italic"><span style="color: #9A1900">%% Perform post_init initialization here...</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handling_frames_from_the_client">Handling frames from the client</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The handler can decide to send frames to the socket, stop
+or just continue without sending anything.</p></div>
+<div class="paragraph"><p>The following snippet echoes back any text frame received and
+ignores all others.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">Frame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span>, <span style="color: #990000">_</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">reply</span>, <span style="color: #009900">Frame</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">websocket_handle</span></span>(<span style="color: #009900">_Frame</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handling_erlang_messages">Handling Erlang messages</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy will call <code>websocket_info/3</code> whenever an Erlang message
+arrives.</p></div>
+<div class="paragraph"><p>The handler can decide to send frames to the socket, stop
+or just continue without sending anything.</p></div>
+<div class="paragraph"><p>The following snippet forwards any <code>log</code> message to the socket
+and ignores all others.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>({<span style="font-weight: bold"><span style="color: #000080">log</span></span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">reply</span>, {<span style="color: #FF6600">text</span>, <span style="color: #009900">Text</span>}, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #009900">_Info</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_frames_to_the_socket">Sending frames to the socket</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy allows sending either a single frame or a list of
+frames to the socket, in which case the frames are sent
+sequentially. Any frame can be sent: text, binary, ping,
+pong or close frames.</p></div>
+<div class="paragraph"><p>The following example sends three frames using a single <code>reply</code>
+tuple.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">websocket_info</span></span>(<span style="color: #FF6600">hello_world</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">reply</span>, [
+ {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello"</span>},
+ {<span style="color: #FF6600">text</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world!"</span><span style="color: #990000">&gt;&gt;</span>},
+ {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #993399">0</span><span style="color: #990000">:</span><span style="color: #993399">8000</span><span style="color: #990000">&gt;&gt;</span>}
+ ], <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-style: italic"><span style="color: #9A1900">%% More websocket_info/3 clauses here...</span></span></tt></pre></div></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_ping_and_timeout">Ping and timeout</h2>
+<div class="sectionbody">
+<div class="paragraph"><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&#8217;t have to
+handle one million extra timers too!</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>A good timeout value is 60 seconds.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">_Opts</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_websocket</span>, <span style="color: #009900">Req</span>, <span style="color: #008080">#state</span>{}, <span style="color: #993399">60000</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>This value cannot be changed once it is set. It defaults to
+<code>infinity</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hibernate">Hibernate</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_supporting_older_browsers">Supporting older browsers</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Unfortunately Websocket is a relatively recent technology,
+which means that not all browsers support it. A library like
+<a href="https://github.com/ninenines/bullet">Bullet</a> can be used to
+emulate Websocket connections on older browsers.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/guide/ws_protocol.asciidoc b/docs/en/cowboy/2.0/guide/ws_protocol.asciidoc
new file mode 100644
index 00000000..67b2cdf2
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/ws_protocol.asciidoc
@@ -0,0 +1,43 @@
+[[ws_protocol]]
+== The Websocket protocol
+
+This chapter explains what Websocket is and why it is
+a vital component of soft realtime Web applications.
+
+=== Description
+
+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.
+
+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.
+
+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".
+
+=== Implementation
+
+Cowboy implements Websocket as a protocol upgrade. Once the
+upgrade is performed from the `init/2` callback, Cowboy
+switches to Websocket. Please consult the next chapter for
+more information on initiating and handling Websocket
+connections.
+
+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.
+
+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
+`compress` protocol option is set when starting the listener.
diff --git a/docs/en/cowboy/2.0/guide/ws_protocol/index.html b/docs/en/cowboy/2.0/guide/ws_protocol/index.html
new file mode 100644
index 00000000..70ba4917
--- /dev/null
+++ b/docs/en/cowboy/2.0/guide/ws_protocol/index.html
@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: The Websocket protocol</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>The Websocket protocol</span></h1>
+
+<div class="paragraph"><p>This chapter explains what Websocket is and why it is
+a vital component of soft realtime Web applications.</p></div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_implementation">Implementation</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy implements Websocket as a protocol upgrade. Once the
+upgrade is performed from the <code>init/2</code> callback, Cowboy
+switches to Websocket. Please consult the next chapter for
+more information on initiating and handling Websocket
+connections.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Cowboy&#8217;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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/index.html b/docs/en/cowboy/2.0/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/2.0/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/cowboy/2.0/manual/cowboy/index.html b/docs/en/cowboy/2.0/manual/cowboy/index.html
new file mode 100644
index 00000000..7c866e32
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy/index.html
@@ -0,0 +1,328 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy - HTTP server</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy</code> module provides convenience functions for
+manipulating Ranch listeners.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_fields_field">fields() = [Field]</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Field</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
+ | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()]}
+ | {<span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>() | [<span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()], <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}]</tt></pre></div></div>
+<div class="paragraph"><p>Fields for match operations. Constraint(s) and default value are optional.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_http_headers_binary_iodata">http_headers() = [{binary(), iodata()}]</h3>
+<div class="paragraph"><p>HTTP headers as a list of key/values.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_http_status_non_neg_integer_binary">http_status() = non_neg_integer() | binary()</h3>
+<div class="paragraph"><p>HTTP status.</p></div>
+<div class="paragraph"><p>A binary status can be used to set a custom message.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_http_version_http_1_1_http_1_0">http_version() = 'HTTP/1.1' | 'HTTP/1.0'</h3>
+<div class="paragraph"><p>HTTP version.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_code_onresponse_fun_fun_http_status_http_headers_iodata_cowboy_req_req_gt_cowboy_req_req_code"><code>onresponse_fun() = fun((http_status(), http_headers(), iodata(), cowboy_req:req()) -&gt; cowboy_req:req())</code></h3>
+<div class="paragraph"><p>Fun called immediately before sending the response.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_start_http_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) &#8594; {ok, pid()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ranch:ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+NbAcceptors = non_neg_integer()
+</dt>
+<dd>
+<p>
+Number of acceptor processes.
+</p>
+</dd>
+<dt class="hdlist1">
+TransOpts = ranch_tcp:opts()
+</dt>
+<dd>
+<p>
+TCP transport options.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = cowboy_protocol:opts()
+</dt>
+<dd>
+<p>
+HTTP protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Start listening for HTTP connections. Returns the pid for this
+listener&#8217;s supervisor.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_start_https_ref_nbacceptors_transopts_protoopts_8594_ok_pid">start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) &#8594; {ok, pid()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ranch:ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+NbAcceptors = non_neg_integer()
+</dt>
+<dd>
+<p>
+Number of acceptor processes.
+</p>
+</dd>
+<dt class="hdlist1">
+TransOpts = ranch_ssl:opts()
+</dt>
+<dd>
+<p>
+SSL transport options.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = cowboy_protocol:opts()
+</dt>
+<dd>
+<p>
+HTTP protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Start listening for HTTPS connections. Returns the pid for this
+listener&#8217;s supervisor.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ranch:ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Stop a previously started listener.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_env_ref_name_value_8594_ok">set_env(Ref, Name, Value) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ranch:ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Name of environment value.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = any()
+</dt>
+<dd>
+<p>
+Environment value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set or update an environment value for an already running listener.
+This will take effect on all subsequent connections.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <a href="http://ninenines.eu/docs/en/ranch/HEAD/guide">Ranch guide</a>
+provides detailed information about how listeners work.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_app/index.html b/docs/en/cowboy/2.0/manual/cowboy_app/index.html
new file mode 100644
index 00000000..eaba7602
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_app/index.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy(7)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy(7)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy - Small, fast, modular HTTP server.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependencies">Dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><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&#8217;t before.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_environment">Environment</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy</code> application does not define any application
+environment configuration parameters.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_handler/index.html b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html
new file mode 100644
index 00000000..5954d21f
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_handler/index.html
@@ -0,0 +1,365 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_handler(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_handler(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_handler - handler middleware and behaviour</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Environment input:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+handler = module()
+</dt>
+<dd>
+<p>
+Handler to be executed.
+</p>
+</dd>
+<dt class="hdlist1">
+handler_opts = any()
+</dt>
+<dd>
+<p>
+Options to be passed to the handler.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Environment output:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+result = ok
+</dt>
+<dd>
+<p>
+Result of the request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>This module also defines the <code>cowboy_handler</code> behaviour that
+defines the basic interface for handlers. All Cowboy handlers
+implement at least the <code>init/2</code> callback, and may implement
+the <code>terminate/3</code> callback optionally.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_terminate_reasons">Terminate reasons</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The following values may be received as the terminate reason
+in the optional <code>terminate/3</code> callback. Different handler types
+may define additional terminate reasons.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+normal
+</dt>
+<dd>
+<p>
+ The connection was closed normally.
+</p>
+</dd>
+<dt class="hdlist1">
+{crash, Class, Reason}
+</dt>
+<dd>
+<p>
+ A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
+ used to obtain more information about the crash. The function
+ <code>erlang:get_stacktrace/0</code> can also be called to obtain the
+ stacktrace of the process when the crash occurred.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_init_req_opts_8594_ok_req_state_module_req_state_module_req_state_hibernate_timeout_module_req_state_timeout_hibernate">init(Req, Opts) &#8594; {ok, Req, State} | {Module, Req, State} | {Module, Req, State, hibernate | Timeout} | {Module, Req, State, Timeout, hibernate}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+Opts = any()
+</dt>
+<dd>
+<p>
+Handler options.
+</p>
+</dd>
+<dt class="hdlist1">
+State = any()
+</dt>
+<dd>
+<p>
+Handler state.
+</p>
+</dd>
+<dt class="hdlist1">
+Module = module()
+</dt>
+<dd>
+<p>
+Module of the sub-protocol to use.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+Timeout passed to the sub-protocol, when applicable.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Process the request.</p></div>
+<div class="paragraph"><p>This function can be used to switch to an alternate handler
+type by returning the name of the module to be used, along
+with a few options.</p></div>
+<div class="paragraph"><p>For basic handlers this is the function where the response
+should be sent. If no response is sent, Cowboy will ensure
+that a <code>204 No Content</code> response is sent.</p></div>
+<div class="paragraph"><p>A crash in this callback will result in <code>terminate/3</code> being
+called if it is defined, with the <code>State</code> argument set to
+the value of <code>Opts</code> originally given to the <code>init/2</code> callback.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_terminate_reason_req_state_8594_ok">terminate(Reason, Req, State) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Reason for termination.
+</p>
+</dd>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+State = any()
+</dt>
+<dd>
+<p>
+Handler state.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Perform any necessary cleanup of the state.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>A crash in this callback or an invalid return value will
+result in the closing of the connection and the termination
+of the process.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_terminate_reason_req_state_handler_8594_ok">terminate(Reason, Req, State, Handler) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Reason for termination.
+</p>
+</dd>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+State = any()
+</dt>
+<dd>
+<p>
+Handler state.
+</p>
+</dd>
+<dt class="hdlist1">
+Handler = module()
+</dt>
+<dd>
+<p>
+Handler module.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Call the optional <code>terminate/3</code> callback if it exists.</p></div>
+<div class="paragraph"><p>This function should always be called at the end of the execution
+of a handler, to give it a chance to clean up or perform
+miscellaneous operations.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_loop/index.html b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html
new file mode 100644
index 00000000..968131fa
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_loop/index.html
@@ -0,0 +1,289 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_loop(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_loop(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_loop - loop handlers</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_loop</code> module implements a handler interface for
+long running HTTP connections. It is the recommended interface
+for long polling and server-sent events, amongst others.</p></div>
+<div class="paragraph"><p>This module is a sub protocol that defines three callbacks to
+be implemented by handlers. The <code>init/2</code> and <code>terminate/3</code>
+callbacks are common to all handler types and are documented
+in the manual for the <a href="cowboy_handler.asciidoc">cowboy_handler</a> module.</p></div>
+<div class="paragraph"><p>The <code>info/3</code> callback is specific to loop handlers and will be
+called as many times as necessary until a reply is sent.</p></div>
+<div class="paragraph"><p>It is highly recommended to return a timeout value from the
+<code>init/2</code> callback to ensure that the process is terminated
+when no data has been received during that timespan. The
+default timeout is <code>infinity</code>, which should only be used if
+you have alternate means of ending inactive connections.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_terminate_reasons">Terminate reasons</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The following values may be received as the terminate reason
+in the optional <code>terminate/3</code> callback.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+normal
+</dt>
+<dd>
+<p>
+ The connection was closed normally before switching to the
+ loop sub protocol. This typically happens if an <code>ok</code> tuple is
+ returned from the <code>init/2</code> callback.
+</p>
+</dd>
+<dt class="hdlist1">
+stop
+</dt>
+<dd>
+<p>
+ The handler requested to close the connection by returning
+ a <code>stop</code> tuple.
+</p>
+</dd>
+<dt class="hdlist1">
+timeout
+</dt>
+<dd>
+<p>
+ The connection has been closed due to inactivity. The timeout
+ value can be configured from <code>init/2</code>. The response sent when
+ this happens is a <code>204 No Content</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+{crash, Class, Reason}
+</dt>
+<dd>
+<p>
+ A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
+ used to obtain more information about the crash. The function
+ <code>erlang:get_stacktrace/0</code> can also be called to obtain the
+ stacktrace of the process when the crash occurred.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, overflow}
+</dt>
+<dd>
+<p>
+ The connection is being closed and the process terminated
+ because the buffer Cowboy uses to keep data sent by the
+ client has reached its maximum. The buffer size can be
+ configured through the environment value <code>loop_max_buffer</code>
+ and defaults to 5000 bytes.
+ <br />
+ If the long running request comes with a body it is recommended
+ to process this body before switching to the loop sub protocol.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, closed}
+</dt>
+<dd>
+<p>
+ The socket has been closed brutally without a close frame being
+ received first.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, Reason}
+</dt>
+<dd>
+<p>
+ A socket error ocurred.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_info_info_req_state_8594_ok_req_state_ok_req_state_hibernate_stop_req_state">info(Info, Req, State) &#8594; {ok, Req, State} | {ok, Req, State, hibernate} | {stop, Req, State}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Info = any()
+</dt>
+<dd>
+<p>
+Message received by the process.
+</p>
+</dd>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+State = any()
+</dt>
+<dd>
+<p>
+Handler state.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Handle the Erlang message received.</p></div>
+<div class="paragraph"><p>This function will be called every time an Erlang message
+has been received. The message can be any Erlang term.</p></div>
+<div class="paragraph"><p>The <code>stop</code> return value can be used to stop the receive loop,
+typically because a response has been sent.</p></div>
+<div class="paragraph"><p>The <code>hibernate</code> option will hibernate the process until
+it receives another message.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html
new file mode 100644
index 00000000..64fce84c
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_middleware/index.html
@@ -0,0 +1,230 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_middleware(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_middleware(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_middleware - behaviour for middlewares</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_middleware</code> behaviour defines the interface used
+by Cowboy middleware modules.</p></div>
+<div class="paragraph"><p>Middlewares process the request sequentially in the order they
+are configured.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_env_atom_any">env() = [{atom(), any()}]</h3>
+<div class="paragraph"><p>The environment variable.</p></div>
+<div class="paragraph"><p>One is created for every request. It is passed to each
+middleware module executed and subsequently returned,
+optionally with its contents modified.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_execute_req_env_8594_ok_req_env_suspend_module_function_args_stop_req">execute(Req, Env) &#8594; {ok, Req, Env} | {suspend, Module, Function, Args} | {stop, Req}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+Env = env()
+</dt>
+<dd>
+<p>
+The request environment.
+</p>
+</dd>
+<dt class="hdlist1">
+Module = module()
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+<dt class="hdlist1">
+Function = atom()
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+<dt class="hdlist1">
+Args = [any()]
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Execute the middleware.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The <code>stop</code> return value stops Cowboy from doing any further
+processing of the request, even if there are middlewares
+that haven&#8217;t been executed yet. The connection may be left
+open to receive more requests from the client.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html b/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html
new file mode 100644
index 00000000..4fdda0b9
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_protocol/index.html
@@ -0,0 +1,279 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_protocol(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_protocol(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_protocol - HTTP protocol</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_protocol</code> module implements HTTP/1.1 and HTTP/1.0
+as a Ranch protocol.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_opts_option">opts() = [Option]</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">compress</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">env</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy_middleware:env</span></span>()}
+ | {<span style="color: #FF6600">max_empty_lines</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">max_header_name_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">max_header_value_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">max_headers</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">max_keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">max_request_line_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">middlewares</span>, [<span style="font-weight: bold"><span style="color: #000000">module</span></span>()]}
+ | {<span style="color: #FF6600">onresponse</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy:onresponse_fun</span></span>()}
+ | {<span style="color: #FF6600">timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Configuration for the HTTP protocol handler.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_option_descriptions">Option descriptions</h3>
+<div class="paragraph"><p>The default value is given next to the option name.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+compress (false)
+</dt>
+<dd>
+<p>
+ When enabled, Cowboy will attempt to compress the response body.
+</p>
+</dd>
+<dt class="hdlist1">
+env ([{listener, Ref}])
+</dt>
+<dd>
+<p>
+ Initial middleware environment.
+</p>
+</dd>
+<dt class="hdlist1">
+max_empty_lines (5)
+</dt>
+<dd>
+<p>
+ Maximum number of empty lines before a request.
+</p>
+</dd>
+<dt class="hdlist1">
+max_header_name_length (64)
+</dt>
+<dd>
+<p>
+ Maximum length of header names.
+</p>
+</dd>
+<dt class="hdlist1">
+max_header_value_length (4096)
+</dt>
+<dd>
+<p>
+ Maximum length of header values.
+</p>
+</dd>
+<dt class="hdlist1">
+max_headers (100)
+</dt>
+<dd>
+<p>
+ Maximum number of headers allowed per request.
+</p>
+</dd>
+<dt class="hdlist1">
+max_keepalive (100)
+</dt>
+<dd>
+<p>
+ Maximum number of requests allowed per connection.
+</p>
+</dd>
+<dt class="hdlist1">
+max_request_line_length (4096)
+</dt>
+<dd>
+<p>
+ Maximum length of the request line.
+</p>
+</dd>
+<dt class="hdlist1">
+middlewares ([cowboy_router, cowboy_handler])
+</dt>
+<dd>
+<p>
+ List of middlewares to execute for every requests.
+</p>
+</dd>
+<dt class="hdlist1">
+onresponse (undefined)
+</dt>
+<dd>
+<p>
+ Fun called every time a response is sent.
+</p>
+</dd>
+<dt class="hdlist1">
+timeout (5000)
+</dt>
+<dd>
+<p>
+ Time in ms with no requests before Cowboy closes the connection.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req/index.html b/docs/en/cowboy/2.0/manual/cowboy_req/index.html
new file mode 100644
index 00000000..99c4915f
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req/index.html
@@ -0,0 +1,1423 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_req(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req - HTTP request and response</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_req</code> module provides functions to access, manipulate
+and respond to requests.</p></div>
+<div class="paragraph"><p>The functions in this module follow patterns for their return types,
+based on the kind of function.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+access: <code>Value</code>
+</p>
+</li>
+<li>
+<p>
+action: <code>ok | {Result, Req} | {Result, Value, Req}</code>
+</p>
+</li>
+<li>
+<p>
+modification: <code>Req</code>
+</p>
+</li>
+<li>
+<p>
+question: <code>boolean()</code>
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><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
+values which are necessary for Cowboy to keep track of the request
+and response states.</p></div>
+<div class="paragraph"><p>All functions which perform an action should only be called once.
+This includes reading the request body or replying. Cowboy will
+throw an error on the second call when it detects suspicious behavior.</p></div>
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_body_opts_option">body_opts() = [Option]</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">continue</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="font-weight: bold"><span style="color: #000080">length</span></span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">read_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">read_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
+ | {<span style="color: #FF6600">transfer_decode</span>, <span style="font-weight: bold"><span style="color: #000000">transfer_decode_fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
+ | {<span style="color: #FF6600">content_decode</span>, <span style="font-weight: bold"><span style="color: #000000">content_decode_fun</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Request body reading options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_cookie_opts_option">cookie_opts() = [Option]</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">max_age</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">domain</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">path</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">secure</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">http_only</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Cookie options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_req_opaque_to_the_user">req() - opaque to the user</h3>
+<div class="paragraph"><p>The Req object.</p></div>
+<div class="paragraph"><p>All functions in this module receive a <code>Req</code> as argument,
+and some of them return a new object labelled <code>Req2</code> in
+the function descriptions below.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_related_exports">Request related exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_binding_name_req_8594_binding_name_req_undefined">binding(Name, Req) &#8594; binding(Name, Req, undefined)</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:binding/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_binding_name_req_default_8594_value">binding(Name, Req, Default) &#8594; Value</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Binding name.
+</p>
+</dd>
+<dt class="hdlist1">
+Default = any()
+</dt>
+<dd>
+<p>
+Default value.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = any() | Default
+</dt>
+<dd>
+<p>
+Binding value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the value for the given binding.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_bindings_req_8594_name_value">bindings(Req) &#8594; [{Name, Value}]</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Binding name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = any()
+</dt>
+<dd>
+<p>
+Binding value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return all bindings.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_header_name_req_8594_header_name_req_undefined">header(Name, Req) &#8594; header(Name, Req, undefined)</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:header/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_header_name_req_default_8594_value">header(Name, Req, Default) &#8594; Value</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Request header name.
+</p>
+</dd>
+<dt class="hdlist1">
+Default = any()
+</dt>
+<dd>
+<p>
+Default value.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = binary() | Default
+</dt>
+<dd>
+<p>
+Request header value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the value for the given header.</p></div>
+<div class="paragraph"><p>While header names are case insensitive, this function expects
+the name to be a lowercase binary.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_headers_req_8594_headers">headers(Req) &#8594; Headers</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Headers = cowboy:http_headers()
+</dt>
+<dd>
+<p>
+Request headers.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return all headers.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_host_req_8594_host">host(Req) &#8594; Host</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Host = binary()
+</dt>
+<dd>
+<p>
+Requested host.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the requested host.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_host_info_req_8594_hostinfo">host_info(Req) &#8594; HostInfo</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+HostInfo = cowboy_router:tokens() | undefined
+</dt>
+<dd>
+<p>
+Extra tokens for the host.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the extra tokens from matching against <code>...</code> during routing.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_host_url_req_8594_hosturl">host_url(Req) &#8594; HostURL</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+HostURL = binary() | undefined
+</dt>
+<dd>
+<p>
+Requested URL, without the path component.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the requested URL excluding the path component.</p></div>
+<div class="paragraph"><p>This function will always return <code>undefined</code> until the
+<code>cowboy_router</code> middleware has been executed.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_match_cookies_fields_req_8594_map">match_cookies(Fields, Req) &#8594; Map</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Fields = cowboy:fields()
+</dt>
+<dd>
+<p>
+Cookie fields match rules.
+</p>
+</dd>
+<dt class="hdlist1">
+Map = map()
+</dt>
+<dd>
+<p>
+Cookie fields matched.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Match cookies against the given fields.</p></div>
+<div class="paragraph"><p>Cowboy will only return the cookie values specified in the
+fields list, and ignore all others. Fields can be either
+the name of the cookie requested; the name along with a
+list of constraints; or the name, a list of constraints
+and a default value in case the cookie is missing.</p></div>
+<div class="paragraph"><p>This function will crash if the cookie is missing and no
+default value is provided. This function will also crash
+if a constraint fails.</p></div>
+<div class="paragraph"><p>The name of the cookie must be provided as an atom. The
+key of the returned map will be that atom. The value may
+be converted through the use of constraints, making this
+function able to extract, validate and convert values all
+in one step.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_match_qs_fields_req_8594_map">match_qs(Fields, Req) &#8594; Map</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Fields = cowboy:fields()
+</dt>
+<dd>
+<p>
+Query string fields match rules.
+</p>
+</dd>
+<dt class="hdlist1">
+Map = map()
+</dt>
+<dd>
+<p>
+Query string fields matched.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Match the query string against the given fields.</p></div>
+<div class="paragraph"><p>Cowboy will only return the query string values specified
+in the fields list, and ignore all others. Fields can be
+either the key requested; the key along with a list of
+constraints; or the key, a list of constraints and a
+default value in case the key is missing.</p></div>
+<div class="paragraph"><p>This function will crash if the key is missing and no
+default value is provided. This function will also crash
+if a constraint fails.</p></div>
+<div class="paragraph"><p>The key must be provided as an atom. The key of the
+returned map will be that atom. The value may be converted
+through the use of constraints, making this function able
+to extract, validate and convert values all in one step.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_meta_name_req_8594_meta_name_req_undefined">meta(Name, Req) &#8594; meta(Name, Req, undefined)</h3>
+<div class="paragraph"><p>Alias for <code>cowboy_req:meta/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_meta_name_req_default_8594_value">meta(Name, Req, Default) &#8594; Value</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Metadata name.
+</p>
+</dd>
+<dt class="hdlist1">
+Default = any()
+</dt>
+<dd>
+<p>
+Default value.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = any()
+</dt>
+<dd>
+<p>
+Metadata value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return metadata about the request.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_method_req_8594_method">method(Req) &#8594; Method</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Method = binary()
+</dt>
+<dd>
+<p>
+Request method.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the method.</p></div>
+<div class="paragraph"><p>Methods are case sensitive. Standard methods are always uppercase.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_parse_cookies_req_8594_name_value">parse_cookies(Req) &#8594; [{Name, Value}]</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Cookie name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = binary()
+</dt>
+<dd>
+<p>
+Cookie value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Parse and return all cookies.</p></div>
+<div class="paragraph"><p>Cookie names are case sensitive.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_parse_header_name_req_8594_see_below">parse_header(Name, Req) &#8594; see below</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:parse_header/3</code>.</p></div>
+<div class="paragraph"><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></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Header name </th>
+<th align="center" valign="top"> Header value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">content-length</p></td>
+<td align="center" valign="top"><p class="table"><code>0</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">cookie</p></td>
+<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">transfer-encoding</p></td>
+<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"identity"&gt;&gt;]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">Any other header</p></td>
+<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_parse_header_name_req_default_8594_parsedvalue_default">parse_header(Name, Req, Default) &#8594; ParsedValue | Default</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Request header name.
+</p>
+</dd>
+<dt class="hdlist1">
+Default = any()
+</dt>
+<dd>
+<p>
+Default value.
+</p>
+</dd>
+<dt class="hdlist1">
+ParsedValue - see below
+</dt>
+<dd>
+<p>
+Parsed request header value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Parse the given header.</p></div>
+<div class="paragraph"><p>While header names are case insensitive, this function expects
+the name to be a lowercase binary.</p></div>
+<div class="paragraph"><p>The parsed value differs depending on the header being parsed. The
+following table summarizes the different types returned.</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="50%" />
+<col width="50%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Header name </th>
+<th align="center" valign="top"> Type of parsed header value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">accept</p></td>
+<td align="center" valign="top"><p class="table"><code>[{{Type, SubType, Params}, Quality, AcceptExt}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">accept-charset</p></td>
+<td align="center" valign="top"><p class="table"><code>[{Charset, Quality}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">accept-encoding</p></td>
+<td align="center" valign="top"><p class="table"><code>[{Encoding, Quality}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">accept-language</p></td>
+<td align="center" valign="top"><p class="table"><code>[{LanguageTag, Quality}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">authorization</p></td>
+<td align="center" valign="top"><p class="table"><code>{AuthType, Credentials}</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">content-length</p></td>
+<td align="center" valign="top"><p class="table"><code>non_neg_integer()</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">content-type</p></td>
+<td align="center" valign="top"><p class="table"><code>{Type, SubType, ContentTypeParams}</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">cookie</p></td>
+<td align="center" valign="top"><p class="table"><code>[{binary(), binary()}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">expect</p></td>
+<td align="center" valign="top"><p class="table"><code>[Expect | {Expect, ExpectValue, Params}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">if-match</p></td>
+<td align="center" valign="top"><p class="table"><code>'*' | [{weak | strong, OpaqueTag}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">if-modified-since</p></td>
+<td align="center" valign="top"><p class="table"><code>calendar:datetime()</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">if-none-match</p></td>
+<td align="center" valign="top"><p class="table"><code>'*' | [{weak | strong, OpaqueTag}]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">if-unmodified-since</p></td>
+<td align="center" valign="top"><p class="table"><code>calendar:datetime()</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">range</p></td>
+<td align="center" valign="top"><p class="table"><code>{Unit, [Range]}</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">sec-websocket-protocol</p></td>
+<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">transfer-encoding</p></td>
+<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">upgrade</p></td>
+<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">x-forwarded-for</p></td>
+<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>Types for the above table:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Type = SubType = Charset = Encoding = LanguageTag = binary()
+</p>
+</li>
+<li>
+<p>
+AuthType = Expect = OpaqueTag = Unit = binary()
+</p>
+</li>
+<li>
+<p>
+Params = ContentTypeParams = [{binary(), binary()}]
+</p>
+</li>
+<li>
+<p>
+Quality = 0..1000
+</p>
+</li>
+<li>
+<p>
+AcceptExt = [{binary(), binary()} | binary()]
+</p>
+</li>
+<li>
+<p>
+Credentials - see below
+</p>
+</li>
+<li>
+<p>
+Range = {non_neg_integer(), non_neg_integer() | infinity} | neg_integer()
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The headers accept, accept-encoding and cookie headers can return
+an empty list. Some other headers are expected to have a value if provided
+and may crash if the value is missing.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The range header value <code>Range</code> can take three forms:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<code>{From, To}</code>: from <code>From</code> to <code>To</code> units
+</p>
+</li>
+<li>
+<p>
+<code>{From, infinity}</code>: everything after <code>From</code> units
+</p>
+</li>
+<li>
+<p>
+<code>-Final</code>: the final <code>Final</code> units
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>An <code>undefined</code> tuple will be returned if Cowboy doesn&#8217;t know how
+to parse the requested header.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_parse_qs_req_8594_name_value">parse_qs(Req) &#8594; [{Name, Value}]</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Query string field name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = binary() | true
+</dt>
+<dd>
+<p>
+Query string field value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the request&#8217;s query string as a list of tuples.</p></div>
+<div class="paragraph"><p>The atom <code>true</code> is returned for keys which have no value.
+Keys with no value are different from keys with an empty
+value in that they do not have a <code>=</code> indicating the presence
+of a value.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_path_req_8594_path">path(Req) &#8594; Path</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Path = binary()
+</dt>
+<dd>
+<p>
+Requested path.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the requested path.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_path_info_req_8594_pathinfo">path_info(Req) &#8594; PathInfo</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+PathInfo = cowboy_router:tokens() | undefined
+</dt>
+<dd>
+<p>
+Extra tokens for the path.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the extra tokens from matching against <code>...</code> during routing.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_peer_req_8594_peer">peer(Req) &#8594; Peer</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+</dt>
+<dd>
+<p>
+Peer IP address and port number.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the client&#8217;s IP address and port number.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_port_req_8594_port">port(Req) &#8594; Port</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Requested port number.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the request&#8217;s port.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_qs_req_8594_querystring">qs(Req) &#8594; QueryString</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+QueryString = binary()
+</dt>
+<dd>
+<p>
+Unprocessed query string.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the request&#8217;s query string.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_meta_name_value_req_8594_req2">set_meta(Name, Value, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Metadata name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = any()
+</dt>
+<dd>
+<p>
+Metadata value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set metadata about the request.</p></div>
+<div class="paragraph"><p>An existing value will be overwritten.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_url_req_8594_url">url(Req) &#8594; URL</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+URL = binary() | undefined
+</dt>
+<dd>
+<p>
+Requested URL.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the requested URL.</p></div>
+<div class="paragraph"><p>This function will always return <code>undefined</code> until the
+<code>cowboy_router</code> middleware has been executed.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_version_req_8594_version">version(Req) &#8594; Version</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Version = cowboy:http_version()
+</dt>
+<dd>
+<p>
+Client&#8217;s advertised HTTP version.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the HTTP version used for this request.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_body_related_exports">Request body related exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_body_req_8594_body_req">body(Req) &#8594; body(Req, [])</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:body/2</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_body_req_opts_8594_ok_data_req2_more_data_req2">body(Req, Opts) &#8594; {ok, Data, Req2} | {more, Data, Req2}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Opts = [body_opt()]
+</dt>
+<dd>
+<p>
+Request body reading options.
+</p>
+</dd>
+<dt class="hdlist1">
+Data = binary()
+</dt>
+<dd>
+<p>
+Data read from the body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Read the request body.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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&#8217;t already there.</p></div>
+<div class="paragraph"><p>This function can only be called once. Cowboy will not cache
+the result of this call.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_body_length_req_8594_length">body_length(Req) &#8594; Length</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Length = non_neg_integer() | undefined
+</dt>
+<dd>
+<p>
+Length of the request body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the length of the request body.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_body_qs_req_8594_body_qs_req_length_64000_read_length_64000_read_timeout_5000">body_qs(Req) &#8594; body_qs(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:body_qs/2</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_body_qs_req_opts_8594_ok_name_value_req2_badlength_req2">body_qs(Req, Opts) &#8594; {ok, [{Name, Value}], Req2} | {badlength, Req2}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Opts = [body_opt()]
+</dt>
+<dd>
+<p>
+Request body reading options.
+</p>
+</dd>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Field name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = binary() | true
+</dt>
+<dd>
+<p>
+Field value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the request body as a list of tuples.</p></div>
+<div class="paragraph"><p>This function will parse the body assuming the content-type
+application/x-www-form-urlencoded, commonly used for the
+query string.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This function can only be called once. Cowboy will not cache
+the result of this call.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_has_body_req_8594_boolean">has_body(Req) &#8594; boolean()</h3>
+<div class="paragraph"><p>Return whether the request has a body.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_part_req_8594_part_req_length_64000_read_length_64000_read_timeout_5000">part(Req) &#8594; part(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:part/2</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_part_req_opts_8594_ok_headers_req2_done_req2">part(Req, Opts) &#8594; {ok, Headers, Req2} | {done, Req2}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Opts = [body_opt()]
+</dt>
+<dd>
+<p>
+Request body reading options.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = cow_multipart:headers()
+</dt>
+<dd>
+<p>
+Part&#8217;s headers.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Read the headers for the next part of the multipart message.</p></div>
+<div class="paragraph"><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&#8217;t
+been read. Both are skipped automatically when calling this
+function.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Note that once a part has been read, or skipped, it cannot
+be read again.</p></div>
+<div class="paragraph"><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&#8217;s body.
+You might want to consider skipping large parts manually.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_part_body_req_8594_part_body_req">part_body(Req) &#8594; part_body(Req, [])</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:part_body/2</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_part_body_req_opts_8594_ok_data_req2_more_data_req2">part_body(Req, Opts) &#8594; {ok, Data, Req2} | {more, Data, Req2}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Opts = [body_opt()]
+</dt>
+<dd>
+<p>
+Request body reading options.
+</p>
+</dd>
+<dt class="hdlist1">
+Data = binary()
+</dt>
+<dd>
+<p>
+Part&#8217;s body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
+<div class="paragraph"><p>This function calls <code>body/2</code> for reading the body, with the
+same options it received. It uses the same defaults.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>Note that once the body has been read, fully or partially,
+it cannot be read again.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_response_related_exports">Response related exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_chunk_data_req_8594_ok">chunk(Data, Req) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Data = iodata()
+</dt>
+<dd>
+<p>
+Chunk data to be sent.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send a chunk of data.</p></div>
+<div class="paragraph"><p>This function should be called as many times as needed
+to send data chunks after calling <code>chunked_reply/{2,3}</code>.</p></div>
+<div class="paragraph"><p>When the method is HEAD, no data will actually be sent.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_chunked_reply_statuscode_req_8594_chunked_reply_statuscode_req">chunked_reply(StatusCode, Req) &#8594; chunked_reply(StatusCode, [], Req)</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:chunked_reply/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_chunked_reply_statuscode_headers_req_8594_req2">chunked_reply(StatusCode, Headers, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+StatusCode = cowboy:http_status()
+</dt>
+<dd>
+<p>
+Response status code.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = cowboy:http_headers()
+</dt>
+<dd>
+<p>
+Response headers.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send a response using chunked transfer-encoding.</p></div>
+<div class="paragraph"><p>This function effectively sends the response status line
+and headers to the client.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>This function can only be called once, with the exception
+of overriding the response in the <code>onresponse</code> hook.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_continue_req_8594_ok">continue(Req) &#8594; ok</h3>
+<div class="paragraph"><p>Send a 100 Continue intermediate reply.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_delete_resp_header_name_req_8594_req2">delete_resp_header(Name, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Response header name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Delete the given response header.</p></div>
+<div class="paragraph"><p>While header names are case insensitive, this function expects
+the name to be a lowercase binary.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_has_resp_body_req_8594_boolean">has_resp_body(Req) &#8594; boolean()</h3>
+<div class="paragraph"><p>Return whether a response body has been set.</p></div>
+<div class="paragraph"><p>This function will return false if a response body has
+been set with a length of 0.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_has_resp_header_name_req_8594_boolean">has_resp_header(Name, Req) &#8594; boolean()</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Response header name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return whether the given response header has been set.</p></div>
+<div class="paragraph"><p>While header names are case insensitive, this function expects
+the name to be a lowercase binary.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_reply_statuscode_req_8594_reply_statuscode_req">reply(StatusCode, Req) &#8594; reply(StatusCode, [], Req)</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:reply/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_reply_statuscode_headers_req_see_below">reply(StatusCode, Headers, Req) - see below</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:reply/4</code>, with caveats.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_reply_statuscode_headers_body_req_8594_req2">reply(StatusCode, Headers, Body, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+StatusCode = cowboy:http_status()
+</dt>
+<dd>
+<p>
+Response status code.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = cowboy:http_headers()
+</dt>
+<dd>
+<p>
+Response headers.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Response body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send a response.</p></div>
+<div class="paragraph"><p>This function effectively sends the response status line,
+headers and body to the client, in a single send function
+call.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>No more data can be sent to the client after this function
+returns.</p></div>
+<div class="paragraph"><p>This function can only be called once, with the exception
+of overriding the response in the <code>onresponse</code> hook.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_body_body_req_8594_req2">set_resp_body(Body, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Response body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set a response body.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_body_fun_fun_req_8594_req2">set_resp_body_fun(Fun, Req) &#8594; Req2</h3>
+<div class="paragraph"><p>Alias of <code>cowboy_req:set_resp_body_fun/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_body_fun_length_fun_req_8594_req2">set_resp_body_fun(Length, Fun, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Fun = fun((Socket, Transport) &#8594; ok)
+</dt>
+<dd>
+<p>
+Fun that will send the response body.
+</p>
+</dd>
+<dt class="hdlist1">
+Socket = inet:socket()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+Transport = module()
+</dt>
+<dd>
+<p>
+Transport module for this socket.
+</p>
+</dd>
+<dt class="hdlist1">
+Length = non_neg_integer()
+</dt>
+<dd>
+<p>
+Length of the response body.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set a fun for sending the response body.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The fun will receive the Ranch <code>Socket</code> and <code>Transport</code> as
+arguments. Only send and sendfile operations are supported.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_body_fun_chunked_fun_req_8594_req2">set_resp_body_fun(chunked, Fun, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Fun = fun((ChunkFun) &#8594; ok)
+</dt>
+<dd>
+<p>
+Fun that will send the response body.
+</p>
+</dd>
+<dt class="hdlist1">
+ChunkFun = funiodata( &#8594; ok)
+</dt>
+<dd>
+<p>
+Fun to call for every chunk to be sent.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set a fun for sending the response body using chunked transfer-encoding.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_cookie_name_value_opts_req_8594_req2">set_resp_cookie(Name, Value, Opts, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = iodata()
+</dt>
+<dd>
+<p>
+Cookie name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = iodata()
+</dt>
+<dd>
+<p>
+Cookie value.
+</p>
+</dd>
+<dt class="hdlist1">
+Opts = cookie_opts()
+</dt>
+<dd>
+<p>
+Cookie options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set a cookie in the response.</p></div>
+<div class="paragraph"><p>Cookie names are case sensitive.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_resp_header_name_value_req_8594_req2">set_resp_header(Name, Value, Req) &#8594; Req2</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = binary()
+</dt>
+<dd>
+<p>
+Response header name.
+</p>
+</dd>
+<dt class="hdlist1">
+Value = iodata()
+</dt>
+<dd>
+<p>
+Response header value.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set a response header.</p></div>
+<div class="paragraph"><p>You should use <code>set_resp_cookie/4</code> instead of this function
+to set cookies.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_rest/index.html b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html
new file mode 100644
index 00000000..7369592c
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_rest/index.html
@@ -0,0 +1,508 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_rest(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_rest(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_rest - REST handlers</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_rest</code> module implements REST semantics on top of
+the HTTP protocol.</p></div>
+<div class="paragraph"><p>This module is a sub protocol that defines many callbacks
+be implemented by handlers. The <code>init/2</code> and <code>terminate/3</code>
+callbacks are common to all handler types and are documented
+in the manual for the <a href="cowboy_handler.asciidoc">cowboy_handler</a> module.</p></div>
+<div class="paragraph"><p>All other callbacks are optional, though some may become
+required depending on the return value of previous callbacks.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_meta_values">Meta values</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+charset = binary()
+</dt>
+<dd>
+<p>
+ Negotiated charset.
+ <br />
+ This value may not be defined if no charset was negotiated.
+</p>
+</dd>
+<dt class="hdlist1">
+language = binary()
+</dt>
+<dd>
+<p>
+ Negotiated language.
+ <br />
+ This value may not be defined if no language was negotiated.
+</p>
+</dd>
+<dt class="hdlist1">
+media_type = {binary(), binary(), <em>*</em> | [{binary(), binary()}]}
+</dt>
+<dd>
+<p>
+ Negotiated media-type.
+ <br />
+ The media-type is the content-type, excluding the charset.
+ <br />
+ This value is always defined after the call to
+ <code>content_types_provided/2</code>.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_terminate_reasons">Terminate reasons</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The following values may be received as the terminate reason
+in the optional <code>terminate/3</code> callback.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+normal
+</dt>
+<dd>
+<p>
+ The connection was closed normally.
+</p>
+</dd>
+<dt class="hdlist1">
+{crash, Class, Reason}
+</dt>
+<dd>
+<p>
+ A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
+ used to obtain more information about the crash. The function
+ <code>erlang:get_stacktrace/0</code> can also be called to obtain the
+ stacktrace of the process when the crash occurred.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_callback_req_state_8594_value_req_state_stop_req_state">Callback(Req, State) &#8594; {Value, Req, State} | {stop, Req, State}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Callback
+</dt>
+<dd>
+<p>
+One of the REST callbacks described below.
+</p>
+</dd>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+State = any()
+</dt>
+<dd>
+<p>
+Handler state.
+</p>
+</dd>
+<dt class="hdlist1">
+Value
+</dt>
+<dd>
+<p>
+See the REST callbacks description below.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The <code>stop</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></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_rest_callbacks_description">REST callbacks description</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_allowed_methods">allowed_methods</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Methods
+</dt>
+<dd>
+<p>
+all
+</p>
+</dd>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+[binary()]
+</p>
+</dd>
+<dt class="hdlist1">
+Default value
+</dt>
+<dd>
+<p>
+<code>[&lt;&lt;"GET"&gt;&gt;, &lt;&lt;"HEAD"&gt;&gt;, &lt;&lt;"OPTIONS"&gt;&gt;]</code>
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the list of allowed methods.</p></div>
+<div class="paragraph"><p>Methods are case sensitive. Standard methods are always uppercase.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_allow_missing_post">allow_missing_post</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Methods
+</dt>
+<dd>
+<p>
+POST
+</p>
+</dd>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+boolean()
+</p>
+</dd>
+<dt class="hdlist1">
+Default value
+</dt>
+<dd>
+<p>
+true
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return whether POST is allowed when the resource doesn&#8217;t exist.</p></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_charsets_provided">charsets_provided</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Methods
+</dt>
+<dd>
+<p>
+GET, HEAD, POST, PUT, PATCH, DELETE
+</p>
+</dd>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+[binary()]
+</p>
+</dd>
+<dt class="hdlist1">
+Default behavior
+</dt>
+<dd>
+<p>
+Skip to the next step if undefined.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the list of charsets the resource provides.</p></div>
+<div class="paragraph"><p>The list must be ordered in order of preference.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><p>The chosen charset will be set in the <code>Req</code> object as the meta
+value <code>charset</code>.</p></div>
+<div class="paragraph"><p>While charsets are case insensitive, this callback is expected
+to return them as lowercase binary.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_content_types_accepted">content_types_accepted</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Methods
+</dt>
+<dd>
+<p>
+POST, PUT, PATCH
+</p>
+</dd>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+[{binary() | {Type, SubType, Params}, AcceptResource}]
+</p>
+</dd>
+<dt class="hdlist1">
+Default behavior
+</dt>
+<dd>
+<p>
+Crash if undefined.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>With types:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Type = SubType = binary()
+</p>
+</li>
+<li>
+<p>
+Params = <em>*</em> | [{binary(), binary()}]
+</p>
+</li>
+<li>
+<p>
+AcceptResource = atom()
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Return the list of content-types the resource accepts.</p></div>
+<div class="paragraph"><p>The list must be ordered in order of preference.</p></div>
+<div class="paragraph"><p>Each content-type can be given either as a binary string or as
+a tuple containing the type, subtype and parameters.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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 follows.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+true | {true, URL} | false
+</p>
+</dd>
+<dt class="hdlist1">
+Default behavior
+</dt>
+<dd>
+<p>
+Crash if undefined.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Process the request body.</p></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+<div class="paragraph"><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></div>
+</div>
+<div class="sect2">
+<h3 id="_content_types_provided">content_types_provided</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Methods
+</dt>
+<dd>
+<p>
+GET, HEAD, POST, PUT, PATCH, DELETE
+</p>
+</dd>
+<dt class="hdlist1">
+Value type
+</dt>
+<dd>
+<p>
+[{binary() | {Type, SubType, Params}, ProvideResource}]
+</p>
+</dd>
+<dt class="hdlist1">
+Default value
+</dt>
+<dd>
+<p>
+`[
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_router/index.html b/docs/en/cowboy/2.0/manual/cowboy_router/index.html
new file mode 100644
index 00000000..bdf6eb01
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_router/index.html
@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_router(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_router(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_router - router middleware</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+<div class="sect2">
+<h3 id="_environment_input">Environment input</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+dispatch = dispatch_rules()
+</dt>
+<dd>
+<p>
+Dispatch table.
+</p>
+</dd>
+</dl></div>
+</div>
+<div class="sect2">
+<h3 id="_environment_output">Environment output</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+handler = module()
+</dt>
+<dd>
+<p>
+Handler module.
+</p>
+</dd>
+<dt class="hdlist1">
+handler_opts = any()
+</dt>
+<dd>
+<p>
+Handler options.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_bindings_atom_binary">bindings() = [{atom(), binary()}]</h3>
+<div class="paragraph"><p>List of bindings found during routing.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_dispatch_rules_opaque_to_the_user">dispatch_rules() - opaque to the user</h3>
+<div class="paragraph"><p>Rules for dispatching request used by Cowboy.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_routes_host_paths_host_cowboy_fields_paths">routes() = [{Host, Paths} | {Host, cowboy:fields(), Paths}]</h3>
+<div class="paragraph"><p>With types:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Host = Path = <em>_</em> | iodata()
+</p>
+</li>
+<li>
+<p>
+Paths = [{Path, Handler, Opts} | {Path, cowboy:fields(), Handler, HandlerOpts}]
+</p>
+</li>
+<li>
+<p>
+Handler = module()
+</p>
+</li>
+<li>
+<p>
+HandlerOpts = any()
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Human readable list of routes mapping hosts and paths to handlers.</p></div>
+<div class="paragraph"><p>The syntax for routes is defined in the user guide.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_tokens_binary">tokens() = [binary()]</h3>
+<div class="paragraph"><p>List of host_info and path_info tokens found during routing.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_compile_routes_8594_dispatch_rules">compile(routes()) &#8594; dispatch_rules()</h3>
+<div class="paragraph"><p>Compile the routes for use by Cowboy.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_static/index.html b/docs/en/cowboy/2.0/manual/cowboy_static/index.html
new file mode 100644
index 00000000..62929c59
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_static/index.html
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_static(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_static(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_static - static file handler</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_static</code> module implements file serving capabilities
+by using the REST semantics provided by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_opts_option">opts() = [Option]</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">priv_file</span>, <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">priv_file</span>, <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Extra</span>}
+ | {<span style="color: #FF6600">file</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">file</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Extra</span>}
+ | {<span style="color: #FF6600">priv_dir</span>, <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">priv_dir</span>, <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(), <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Extra</span>}
+ | {<span style="color: #FF6600">dir</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">dir</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>() | <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Extra</span>}
+
+<span style="color: #009900">Extra</span> <span style="color: #990000">=</span> [<span style="color: #009900">ETag</span> | <span style="color: #009900">Mimetypes</span>]
+
+<span style="color: #009900">ETag</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">etag</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()} | {<span style="color: #FF6600">etag</span>, <span style="color: #000080">false</span>}
+
+<span style="color: #009900">Mimetypes</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000000">module</span></span>(), <span style="font-weight: bold"><span style="color: #000080">function</span></span>()}
+ | {<span style="color: #FF6600">mimetypes</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), [{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}]}}</tt></pre></div></div>
+<div class="paragraph"><p>Configuration for the static handler.</p></div>
+<div class="paragraph"><p>The handler can be configured for sending either one file or
+a directory (including its subdirectories).</p></div>
+<div class="paragraph"><p>Extra options allow you to define how the etag should be calculated
+and how the mimetype of files should be detected.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html b/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html
new file mode 100644
index 00000000..9559d6c4
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_sub_protocol/index.html
@@ -0,0 +1,224 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_sub_protocol(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_sub_protocol(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_sub_protocol - sub protocol</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_sub_protocol</code> behaviour defines the interface used
+by modules that implement a protocol on top of HTTP.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_upgrade_req_env_handler_handleropts_8594_ok_req_env_suspend_module_function_args_stop_req">upgrade(Req, Env, Handler, HandlerOpts) &#8594; {ok, Req, Env} | {suspend, Module, Function, Args} | {stop, Req}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req = cowboy_req:req()
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+Env = env()
+</dt>
+<dd>
+<p>
+The request environment.
+</p>
+</dd>
+<dt class="hdlist1">
+Handler = module()
+</dt>
+<dd>
+<p>
+Handler module.
+</p>
+</dd>
+<dt class="hdlist1">
+Opts = any()
+</dt>
+<dd>
+<p>
+Handler options.
+</p>
+</dd>
+<dt class="hdlist1">
+Module = module()
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+<dt class="hdlist1">
+Function = atom()
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+<dt class="hdlist1">
+Args = [any()]
+</dt>
+<dd>
+<p>
+MFA to call when resuming the process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Upgrade the protocol.</p></div>
+<div class="paragraph"><p>Please refer to the <code>cowboy_middleware</code> manual for a
+description of the return values.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
new file mode 100644
index 00000000..8b3790c4
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html
@@ -0,0 +1,352 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: cowboy_websocket(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_websocket(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_websocket - Websocket protocol</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>cowboy_websocket</code> module implements the Websocket protocol.</p></div>
+<div class="paragraph"><p>This module is a sub protocol that defines four callbacks to
+be implemented by handlers. The <code>init/2</code> and <code>terminate/3</code>
+callbacks are common to all handler types and are documented
+in the manual for the <a href="cowboy_handler.asciidoc">cowboy_handler</a> module.</p></div>
+<div class="paragraph"><p>The <code>websocket_handle/3</code> and <code>websocket_info/3</code> callbacks are
+specific to Websocket handlers and will be called as many times
+as necessary until the Websocket connection is closed.</p></div>
+<div class="paragraph"><p>The <code>init/2</code> callback can be used to negotiate Websocket protocol
+extensions with the client. It is highly recommended to return a
+timeout value from this callback to ensure that the process is
+terminated when no data has been received during that timespan.
+The default timeout is <code>infinity</code>, which should only be used if
+you have alternate means of ending inactive connections.</p></div>
+<div class="paragraph"><p>Cowboy will terminate the process right after closing the
+Websocket connection. This means that there is no real need to
+perform any cleanup in the optional <code>terminate/3</code> callback.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_meta_values">Meta values</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+websocket_compress = boolean()
+</dt>
+<dd>
+<p>
+ Whether a websocket compression extension in in use.
+</p>
+</dd>
+<dt class="hdlist1">
+websocket_version = 7 | 8 | 13
+</dt>
+<dd>
+<p>
+ The version of the Websocket protocol being used.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_terminate_reasons">Terminate reasons</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The following values may be received as the terminate reason
+in the optional <code>terminate/3</code> callback.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+normal
+</dt>
+<dd>
+<p>
+ The connection was closed normally before establishing a Websocket
+ connection. This typically happens if an <code>ok</code> tuple is returned
+ from the <code>init/2</code> callback.
+</p>
+</dd>
+<dt class="hdlist1">
+remote
+</dt>
+<dd>
+<p>
+ The remote endpoint closed the connection without giving any
+ further details.
+</p>
+</dd>
+<dt class="hdlist1">
+{remote, Code, Payload}
+</dt>
+<dd>
+<p>
+ The remote endpoint closed the connection with the given
+ <code>Code</code> and <code>Payload</code> as the reason.
+</p>
+</dd>
+<dt class="hdlist1">
+stop
+</dt>
+<dd>
+<p>
+ The handler requested to close the connection, either by returning
+ a <code>stop</code> tuple or by sending a <code>close</code> frame.
+</p>
+</dd>
+<dt class="hdlist1">
+timeout
+</dt>
+<dd>
+<p>
+ The connection has been closed due to inactivity. The timeout
+ value can be configured from <code>init/2</code>.
+</p>
+</dd>
+<dt class="hdlist1">
+{crash, Class, Reason}
+</dt>
+<dd>
+<p>
+ A crash occurred in the handler. <code>Class</code> and <code>Reason</code> can be
+ used to obtain more information about the crash. The function
+ <code>erlang:get_stacktrace/0</code> can also be called to obtain the
+ stacktrace of the process when the crash occurred.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, badencoding}
+</dt>
+<dd>
+<p>
+ A text frame was sent by the client with invalid encoding. All
+ text frames must be valid UTF-8.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, badframe}
+</dt>
+<dd>
+<p>
+ A protocol error has been detected.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, closed}
+</dt>
+<dd>
+<p>
+ The socket has been closed brutally without a close frame being
+ received first.
+</p>
+</dd>
+<dt class="hdlist1">
+{error, Reason}
+</dt>
+<dd>
+<p>
+ A socket error ocurred.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_websocket_handle_inframe_req_state_8594_ret">websocket_handle(InFrame, Req, State) &#8594; Ret</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Ret</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+ | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
+ | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+ | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
+ | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+
+<span style="color: #009900">InFrame</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">text</span> | <span style="font-weight: bold"><span style="color: #000080">binary</span></span> | <span style="color: #FF6600">ping</span> | <span style="color: #FF6600">pong</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()
+<span style="color: #009900">State</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
+<span style="color: #009900">OutFrame</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Handle the data received from the Websocket connection.</p></div>
+<div class="paragraph"><p>This function will be called every time data is received
+from the Websocket connection.</p></div>
+<div class="paragraph"><p>The <code>stop</code> return value can be used to close the
+connection. A close reply will also result in the connection
+being closed.</p></div>
+<div class="paragraph"><p>The <code>hibernate</code> option will hibernate the process until
+it receives new data from the Websocket connection or an
+Erlang message.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_websocket_info_info_req_state_8594_ret">websocket_info(Info, Req, State) &#8594; Ret</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Ret</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+ | {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
+ | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+ | {<span style="color: #FF6600">reply</span>, <span style="color: #009900">OutFrame</span> | [<span style="color: #009900">OutFrame</span>], <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>, <span style="color: #FF6600">hibernate</span>}
+ | {<span style="color: #FF6600">stop</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}
+
+<span style="color: #009900">Info</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
+<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()
+<span style="color: #009900">State</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()
+<span style="color: #009900">OutFrame</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cow_ws:frame</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Handle the Erlang message received.</p></div>
+<div class="paragraph"><p>This function will be called every time an Erlang message
+has been received. The message can be any Erlang term.</p></div>
+<div class="paragraph"><p>The <code>stop</code> return value can be used to close the
+connection. A close reply will also result in the connection
+being closed.</p></div>
+<div class="paragraph"><p>The <code>hibernate</code> option will hibernate the process until
+it receives another message or new data from the Websocket
+connection.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/http_status_codes/index.html b/docs/en/cowboy/2.0/manual/http_status_codes/index.html
new file mode 100644
index 00000000..1af04219
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/http_status_codes/index.html
@@ -0,0 +1,407 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: HTTP status codes(7)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>HTTP status codes(7)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>HTTP status codes - status codes used by Cowboy</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_100_continue">100 Continue</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_101_switching_protocols">101 Switching Protocols</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This is the status code sent when switching to the
+Websocket protocol.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_200_ok">200 OK</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_201_created">201 Created</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_202_accepted">202 Accepted</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_204_no_content">204 No Content</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_300_multiple_choices">300 Multiple Choices</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_301_moved_permanently">301 Moved Permanently</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_303_see_other">303 See Other</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_304_not_modified">304 Not Modified</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_307_temporary_redirect">307 Temporary Redirect</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_400_bad_request">400 Bad Request</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Cowboy will send this status code for any of the
+following reasons:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Too many empty lines were sent before the request.
+</p>
+</li>
+<li>
+<p>
+The request-line could not be parsed.
+</p>
+</li>
+<li>
+<p>
+Too many headers were sent.
+</p>
+</li>
+<li>
+<p>
+A header name was too long.
+</p>
+</li>
+<li>
+<p>
+A header value was too long.
+</p>
+</li>
+<li>
+<p>
+The host header was missing from an HTTP/1.1 request.
+</p>
+</li>
+<li>
+<p>
+The host header could not be parsed.
+</p>
+</li>
+<li>
+<p>
+The requested host was not found.
+</p>
+</li>
+<li>
+<p>
+The requested path could not be parsed.
+</p>
+</li>
+<li>
+<p>
+The accept header could not be parsed when using REST.
+</p>
+</li>
+<li>
+<p>
+REST under normal conditions.
+</p>
+</li>
+<li>
+<p>
+A Websocket upgrade failed.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_401_unauthorized">401 Unauthorized</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_403_forbidden">403 Forbidden</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_404_not_found">404 Not Found</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent when the router successfully
+resolved the host but didn&#8217;t find a matching path for
+the request. It may also be sent by <code>cowboy_rest</code> under
+normal conditions.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_405_method_not_allowed">405 Method Not Allowed</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_406_not_acceptable">406 Not Acceptable</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_408_request_timeout">408 Request Timeout</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_409_conflict">409 Conflict</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_410_gone">410 Gone</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_412_precondition_failed">412 Precondition Failed</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_413_request_entity_too_large">413 Request Entity Too Large</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_414_request_uri_too_long">414 Request-URI Too Long</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_415_unsupported_media_type">415 Unsupported Media Type</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_500_internal_server_error">500 Internal Server Error</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_501_not_implemented">501 Not Implemented</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_503_service_unavailable">503 Service Unavailable</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This status code is sent by <code>cowboy_rest</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_505_http_version_not_supported">505 HTTP Version Not Supported</h2>
+<div class="sectionbody">
+<div class="paragraph"><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></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/index.html b/docs/en/cowboy/2.0/manual/index.html
new file mode 100644
index 00000000..2751944d
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/index.html
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Cowboy Function Reference</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Cowboy Function Reference</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="cowboy_app">cowboy(7)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy">cowboy(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_handler">cowboy_handler(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_loop">cowboy_loop(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_middleware">cowboy_middleware(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_protocol">cowboy_protocol(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req">cowboy_req(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_rest">cowboy_rest(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_router">cowboy_router(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_static">cowboy_static(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_sub_protocol">cowboy_sub_protocol(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_websocket">cowboy_websocket(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http_status_codes">HTTP status codes(7)</a>
+</p>
+</li>
+</ul></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/HEAD/guide/index.html b/docs/en/cowboy/HEAD/guide/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/HEAD/guide/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/cowboy/HEAD/index.html b/docs/en/cowboy/HEAD/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/HEAD/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/cowboy/HEAD/manual/index.html b/docs/en/cowboy/HEAD/manual/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/HEAD/manual/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/cowboy/index.html b/docs/en/cowboy/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/cowboy/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/erlang.mk/1/guide/app.asciidoc b/docs/en/erlang.mk/1/guide/app.asciidoc
new file mode 100644
index 00000000..99ff0527
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/app.asciidoc
@@ -0,0 +1,426 @@
+[[building]]
+== Building
+
+Erlang.mk can do a lot of things, but it is, first and
+foremost, a build tool. In this chapter we will cover
+the basics of building a project with Erlang.mk.
+
+For most of this chapter, we will assume that you are
+using a project xref:getting_started[generated by Erlang.mk].
+
+=== How to build
+
+To build a project, all you have to do is type `make`:
+
+[source,bash]
+$ make
+
+It will work regardless of your project: OTP applications,
+library applications, NIFs, port drivers or even releases.
+Erlang.mk also automatically downloads and compiles the
+dependencies for your project.
+
+All this is possible thanks to a combination of configuration
+and conventions. Most of the conventions come from Erlang/OTP
+itself so any seasoned Erlang developers should feel right at
+home.
+
+=== What to build
+
+Erlang.mk gives you control over three steps of the build
+process, allowing you to do a partial build if needed.
+
+A build has three phases: first any dependency is fetched
+and built, then the project itself is built and finally a
+release may be generated when applicable. A release is only
+generated for projects specifically configured to do so.
+
+Erlang.mk handles those three phases automatically when you
+type `make`. But sometimes you just want to repeat one or
+two of them.
+
+The commands detailed in this section are most useful after
+you have a successful build as they allow you to quickly
+redo a step instead of going through everything. This is
+especially useful for large projects or projects that end
+up generating releases.
+
+==== Application
+
+You can build your application and dependencies without
+generating a release by running the following command:
+
+[source,bash]
+$ make app
+
+To build your application without touching dependencies
+at all, you can use the `SKIP_DEPS` variable:
+
+[source,bash]
+$ make app SKIP_DEPS=1
+
+This command is very useful if you have a lot of dependencies
+and develop on a machine with slow file access, like the
+Raspberry Pi and many other embedded devices.
+
+Note that this command may fail if a required dependency
+is missing.
+
+==== Dependencies
+
+You can build all dependencies, and nothing else, by
+running the following command:
+
+[source,bash]
+$ make deps
+
+This will fetch and compile all dependencies and their
+dependencies, recursively.
+
+xref:deps[Packages and dependencies] are covered
+in the next chapter.
+
+==== Release
+
+It is not possible to build the release without at least
+building the application itself, unless of course if there's
+no application to begin with.
+
+To generate the release, `make` will generally suffice with
+a normal Erlang.mk. A separate target is however available,
+and will take care of building the release, after building
+the application and all dependencies:
+
+[source,bash]
+$ make rel
+
+Consult the xref:relx[Releases] chapter for more
+information about what releases are and how they are generated.
+
+=== Application resource file
+
+When building your application, Erlang.mk will generate the
+http://www.erlang.org/doc/man/app.html[application resource file].
+This file is mandatory for all Erlang applications and is
+found in 'ebin/$(PROJECT).app'.
+
+`PROJECT` is a variable defined in your Makefile and taken
+from the name of the directory when Erlang.mk bootstraps
+your project.
+
+Erlang.mk can build the 'ebin/$(PROJECT).app' in two different
+ways: from the configuration found in the Makefile, or from
+the 'src/$(PROJECT).app.src' file.
+
+==== Application configuration
+
+Erlang.mk automatically fills the `PROJECT` variable when
+bootstrapping a new project, but everything else is up to
+you. None of the values are required to build your project,
+although it is recommended to fill everything relevant to
+your situation.
+
+`PROJECT`::
+ The name of the OTP application or library.
+`PROJECT_DESCRIPTION`::
+ Short description of the project.
+`PROJECT_VERSION`::
+ Current version of the project.
+`PROJECT_REGISTERED`::
+ List of the names of all registered processes.
+`LOCAL_DEPS`::
+ List of Erlang/OTP applications this project depends on,
+ excluding `erts`, `kernel` and `stdlib`, or list of
+ dependencies local to this repository (in `APPS_DIR`).
+`DEPS`::
+ List of applications this project depends on that need
+ to be fetched by Erlang.mk.
+
+There's no need for quotes or anything. The relevant part of
+the Cowboy Makefile follows, if you need an example:
+
+[source,make]
+----
+PROJECT = cowboy
+PROJECT_DESCRIPTION = Small, fast, modular HTTP server.
+PROJECT_VERSION = 2.0.0-pre.2
+PROJECT_REGISTERED = cowboy_clock
+
+LOCAL_DEPS = crypto
+DEPS = cowlib ranch
+----
+
+Any space before and after the value is dropped.
+
+xref:deps[Dependencies] are covered in details in
+the next chapter.
+
+==== Legacy method
+
+The 'src/$(PROJECT).app.src' file is a legacy method of
+building Erlang applications. It was introduced by the original
+`rebar` build tool, of which Erlang.mk owes a great deal as it
+is its main inspiration.
+
+The '.app.src' file serves as a template to generate the '.app'
+file. Erlang.mk will take it, fill in the `modules` value
+dynamically, and save the result in 'ebin/$(PROJECT).app'.
+
+When using this method, Erlang.mk cannot fill the `applications`
+key from dependencies automatically, which means you need to
+add them to Erlang.mk and to the '.app.src' at the same time,
+duplicating the work.
+
+If you really can't live without the legacy method, for one
+reason or another, worry not; Erlang.mk will support it. And
+if you need to create a new project that uses this method, you
+just have to say so when bootstrapping:
+
+[source,bash]
+$ make -f erlang.mk bootstrap-lib LEGACY=1
+
+=== Automatic application resource file values
+
+When building the application resource file, Erlang.mk may
+automatically add an `id` key with information about the
+Git commit (if using Git), or an empty string otherwise.
+It will only do this under specific conditions:
+
+* The application was built as a dependency of another, or
+* The legacy method was used, and the '.app.src' file contained `{id, "git"}`
+
+This value is most useful when you need to help your users,
+as it allows you to know which version they run exactly by
+asking them to look in the file, or by running a simple
+command on their production server:
+
+[source,erlang]
+----
+1> application:get_all_key(cowboy).
+{ok,[{description,"Small, fast, modular HTTP server."},
+ {id,"2.0.0-pre.2-25-g0ffde50-dirty"},
+----
+
+=== File formats
+
+Erlang.mk supports a variety of different source file formats.
+The following formats are supported natively:
+
+[cols="<,3*^",options="header"]
+|===
+| Extension | Location | Description | Output
+| .erl | src/ | Erlang source | ebin/*.beam
+| .core | src/ | Core Erlang source | ebin/*.beam
+| .xrl | src/ | Leex source | src/*.erl
+| .yrl | src/ | Yecc source | src/*.erl
+| .asn1 | asn1/ | ASN.1 files | include/*.hrl include/*.asn1db src/*.erl
+| .mib | mibs/ | SNMP MIB files | include/*.hrl priv/mibs/*.bin
+|===
+
+Files are always searched recursively.
+
+The build is ordered, so that files that generate Erlang source
+files are run before, and the resulting Erlang source files are
+then built normally.
+
+In addition, Erlang.mk keeps track of header files (`.hrl`)
+as described at the end of this chapter. It can also compile
+C code, as described in the xref:ports[NIFs and port drivers]
+chapter.
+
+Erlang.mk also comes with plugins for the following formats:
+
+[cols="<,3*^",options="header"]
+|===
+| Extension | Location | Description | Output
+| .dtl | templates/ | Django templates | ebin/*.beam
+| .proto | src/ | Protocol buffers | ebin/*.beam
+|===
+
+=== Compilation options
+
+Erlang.mk provides a few variables that you can use to customize
+the build process and the resulting files.
+
+==== ERLC_OPTS
+
+`ERLC_OPTS` can be used to pass some options to `erlc`, the Erlang
+compiler. Erlang.mk does not restrict any option. Please refer to
+the http://www.erlang.org/doc/man/erlc.html[erlc Manual] for the
+full list.
+
+By default, Erlang.mk will set the following options:
+
+[source,make]
+ERLC_OPTS = -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard
+
+In other words: warnings as errors, debug info (recommended) and
+enable warnings for exported variables, shadow variables and
+obsolete guard functions.
+
+You can redefine this variable in your Makefile to change it
+completely, either before or after including Erlang.mk:
+
+[source,make]
+ERLC_OPTS = +debug_info
+
+You can also filter out some options from the defaults Erlang.mk
+sets, by defining ERLC_OPTS after including Erlang.mk using the
+`:=` operator.
+
+[source,make]
+----
+include erlang.mk
+
+ERLC_OPTS := $(filter-out -Werror,$(ERLC_OPTS))
+----
+
+==== ERLC_EXCLUDE
+
+`ERLC_EXCLUDE` can be used to exclude some modules from the
+compilation. It's there for handling special cases, you should
+not normally need it.
+
+To exclude a module, simply list it in the variable, either
+before or after including Erlang.mk:
+
+[source,make]
+ERLC_EXCLUDE = cowboy_http2
+
+=== Cold and hot builds
+
+The first time you run `make`, Erlang.mk will build everything.
+
+The second time you run `make`, and all subsequent times, Erlang.mk
+will only rebuild what changed. Erlang.mk has been optimized for
+this use case, as it is the most common during development.
+
+Erlang.mk figures out what changed by using the dependency tracking
+feature of Make. Make automatically rebuilds a target if one of its
+dependency has changed (for example if a header file has changed,
+all the source files that include it will be rebuilt), and Erlang.mk
+leverages this feature to cut down on rebuild times.
+
+Note that this applies only to building; some other features of
+Erlang.mk will run every time they are called regardless of files
+changed.
+
+=== Dependency tracking
+
+NOTE: This section is about the dependency tracking between files
+inside your project, not application dependencies.
+
+Erlang.mk keeps track of the dependencies between the different
+files in your project. This information is kept in the '$(PROJECT).d'
+file in your directory. It is generated if missing, and will be
+generated again after every file change, by default.
+
+Dependency tracking is what allows Erlang.mk to know when to
+rebuild Erlang files when header files, behaviors or parse
+transforms have changed. Erlang.mk also automatically keeps
+track of which files should be compiled first, for example
+when you have behaviors used by other modules in your project.
+
+If your project is stable, you may want to disable generating
+the dependency tracking file every time you compile. You can
+do this by adding the following line to your 'Makefile':
+
+[source,make]
+NO_MAKEDEP ?= 1
+
+As you can see, the snippet above uses `?=` instead of a
+simple equal sign. This is to allow you to temporarily override
+this value when you do make substantial changes to your project
+(including a new header file, new module with dependencies, etc.)
+and want to rebuild the dependency tracking file. You'll be
+able to use the following command:
+
+[source,bash]
+$ NO_MAKEDEP= make
+
+Otherwise, `make clean app` will of course force the
+recompilation of your project.
+
+Erlang.mk can also keep track of the source files generated
+by other means, for example if you generate code from a data
+file in your repository.
+
+=== Generating Erlang source
+
+Erlang.mk provides hooks at different stages of the build process.
+When your goal is to generate Erlang source files, you can
+add your own rules before or after the dependency tracking
+file is generated. To do this, you would add your hook before
+or after including the 'erlang.mk' file.
+
+The easiest way is after:
+
+[source,make]
+----
+PROJECT = example
+
+include erlang.mk
+
+$(PROJECT).d:: src/generated_mod.erl
+
+src/generated_mod.erl:: gen-mod.sh
+ $(gen_verbose) ./gen-mod.sh $@
+----
+
+In this case we use `$(gen_verbose)` to hide the details of
+the build by default. Erlang.mk will simply say what file
+is it currently generating.
+
+When using an external script to generate the Erlang source
+file, it is recommended to depend on that script, so that
+the source file gets generated again when the script gets
+modified.
+
+If for whatever reason you prefer to hook before including
+Erlang.mk, don't forget to set the `.DEFAULT_GOAL` variable,
+otherwise nothing will get built:
+
+[source,make]
+----
+PROJECT = example
+
+.DEFAULT_GOAL = all
+
+$(PROJECT).d:: src/generated_mod.erl
+
+include erlang.mk
+
+src/generated_mod.erl:: gen-mod.sh
+ $(gen_verbose) ./gen-mod.sh $@
+----
+
+=== Cleaning
+
+Building typically involves creating a lot of new files. Some
+are reused in rebuilds, some are simply replaced. All can be
+removed safely.
+
+Erlang.mk provides two commands to remove them: `clean` and
+`distclean`. `clean` removes all the intermediate files that
+were created as a result of building, including the BEAM files,
+the dependency tracking file and the generated documentation.
+`distclean` removes these and more, including the downloaded
+dependencies, Dialyzer's PLT file and the generated release,
+putting your directory back to the state it was before you
+started working on it.
+
+To clean:
+
+[source,bash]
+$ make clean
+
+Or distclean:
+
+[source,bash]
+$ make distclean
+
+That is the question.
+
+Note that Erlang.mk will automatically clean some files as
+part of other targets, but it will never run `distclean` if
+you don't explicitly use it.
diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html
new file mode 100644
index 00000000..7d2b36f8
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/app/index.html
@@ -0,0 +1,699 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Building</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Building</span></h1>
+
+<div class="paragraph"><p>Erlang.mk can do a lot of things, but it is, first and
+foremost, a build tool. In this chapter we will cover
+the basics of building a project with Erlang.mk.</p></div>
+<div class="paragraph"><p>For most of this chapter, we will assume that you are
+using a project <a href="../getting_started">generated by Erlang.mk</a>.</p></div>
+<div class="sect1">
+<h2 id="_how_to_build">How to build</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To build a project, all you have to do is type <code>make</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make</tt></pre></div></div>
+<div class="paragraph"><p>It will work regardless of your project: OTP applications,
+library applications, NIFs, port drivers or even releases.
+Erlang.mk also automatically downloads and compiles the
+dependencies for your project.</p></div>
+<div class="paragraph"><p>All this is possible thanks to a combination of configuration
+and conventions. Most of the conventions come from Erlang/OTP
+itself so any seasoned Erlang developers should feel right at
+home.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_what_to_build">What to build</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk gives you control over three steps of the build
+process, allowing you to do a partial build if needed.</p></div>
+<div class="paragraph"><p>A build has three phases: first any dependency is fetched
+and built, then the project itself is built and finally a
+release may be generated when applicable. A release is only
+generated for projects specifically configured to do so.</p></div>
+<div class="paragraph"><p>Erlang.mk handles those three phases automatically when you
+type <code>make</code>. But sometimes you just want to repeat one or
+two of them.</p></div>
+<div class="paragraph"><p>The commands detailed in this section are most useful after
+you have a successful build as they allow you to quickly
+redo a step instead of going through everything. This is
+especially useful for large projects or projects that end
+up generating releases.</p></div>
+<div class="sect3">
+<h4 id="_application">Application</h4>
+<div class="paragraph"><p>You can build your application and dependencies without
+generating a release by running the following command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make app</tt></pre></div></div>
+<div class="paragraph"><p>To build your application without touching dependencies
+at all, you can use the <code>SKIP_DEPS</code> variable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make app <span style="color: #009900">SKIP_DEPS</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>This command is very useful if you have a lot of dependencies
+and develop on a machine with slow file access, like the
+Raspberry Pi and many other embedded devices.</p></div>
+<div class="paragraph"><p>Note that this command may fail if a required dependency
+is missing.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_dependencies">Dependencies</h4>
+<div class="paragraph"><p>You can build all dependencies, and nothing else, by
+running the following command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make deps</tt></pre></div></div>
+<div class="paragraph"><p>This will fetch and compile all dependencies and their
+dependencies, recursively.</p></div>
+<div class="paragraph"><p><a href="../deps">Packages and dependencies</a> are covered
+in the next chapter.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_release">Release</h4>
+<div class="paragraph"><p>It is not possible to build the release without at least
+building the application itself, unless of course if there&#8217;s
+no application to begin with.</p></div>
+<div class="paragraph"><p>To generate the release, <code>make</code> will generally suffice with
+a normal Erlang.mk. A separate target is however available,
+and will take care of building the release, after building
+the application and all dependencies:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make rel</tt></pre></div></div>
+<div class="paragraph"><p>Consult the <a href="../relx">Releases</a> chapter for more
+information about what releases are and how they are generated.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_application_resource_file">Application resource file</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>When building your application, Erlang.mk will generate the
+<a href="http://www.erlang.org/doc/man/app.html">application resource file</a>.
+This file is mandatory for all Erlang applications and is
+found in <em>ebin/$(PROJECT).app</em>.</p></div>
+<div class="paragraph"><p><code>PROJECT</code> is a variable defined in your Makefile and taken
+from the name of the directory when Erlang.mk bootstraps
+your project.</p></div>
+<div class="paragraph"><p>Erlang.mk can build the <em>ebin/$(PROJECT).app</em> in two different
+ways: from the configuration found in the Makefile, or from
+the <em>src/$(PROJECT).app.src</em> file.</p></div>
+<div class="sect3">
+<h4 id="_application_configuration">Application configuration</h4>
+<div class="paragraph"><p>Erlang.mk automatically fills the <code>PROJECT</code> variable when
+bootstrapping a new project, but everything else is up to
+you. None of the values are required to build your project,
+although it is recommended to fill everything relevant to
+your situation.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<code>PROJECT</code>
+</dt>
+<dd>
+<p>
+ The name of the OTP application or library.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>PROJECT_DESCRIPTION</code>
+</dt>
+<dd>
+<p>
+ Short description of the project.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>PROJECT_VERSION</code>
+</dt>
+<dd>
+<p>
+ Current version of the project.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>PROJECT_REGISTERED</code>
+</dt>
+<dd>
+<p>
+ List of the names of all registered processes.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>LOCAL_DEPS</code>
+</dt>
+<dd>
+<p>
+ List of Erlang/OTP applications this project depends on,
+ excluding <code>erts</code>, <code>kernel</code> and <code>stdlib</code>, or list of
+ dependencies local to this repository (in <code>APPS_DIR</code>).
+</p>
+</dd>
+<dt class="hdlist1">
+<code>DEPS</code>
+</dt>
+<dd>
+<p>
+ List of applications this project depends on that need
+ to be fetched by Erlang.mk.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>There&#8217;s no need for quotes or anything. The relevant part of
+the Cowboy Makefile follows, if you need an example:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PROJECT =</span> cowboy
+<span style="color: #009900">PROJECT_DESCRIPTION =</span> Small<span style="color: #990000">,</span> fast<span style="color: #990000">,</span> modular HTTP server<span style="color: #990000">.</span>
+<span style="color: #009900">PROJECT_VERSION =</span> 2.0.0-pre.2
+<span style="color: #009900">PROJECT_REGISTERED =</span> cowboy_clock
+
+<span style="color: #009900">LOCAL_DEPS =</span> crypto
+<span style="color: #009900">DEPS =</span> cowlib ranch</tt></pre></div></div>
+<div class="paragraph"><p>Any space before and after the value is dropped.</p></div>
+<div class="paragraph"><p><a href="../deps">Dependencies</a> are covered in details in
+the next chapter.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_legacy_method">Legacy method</h4>
+<div class="paragraph"><p>The <em>src/$(PROJECT).app.src</em> file is a legacy method of
+building Erlang applications. It was introduced by the original
+<code>rebar</code> build tool, of which Erlang.mk owes a great deal as it
+is its main inspiration.</p></div>
+<div class="paragraph"><p>The <em>.app.src</em> file serves as a template to generate the <em>.app</em>
+file. Erlang.mk will take it, fill in the <code>modules</code> value
+dynamically, and save the result in <em>ebin/$(PROJECT).app</em>.</p></div>
+<div class="paragraph"><p>When using this method, Erlang.mk cannot fill the <code>applications</code>
+key from dependencies automatically, which means you need to
+add them to Erlang.mk and to the <em>.app.src</em> at the same time,
+duplicating the work.</p></div>
+<div class="paragraph"><p>If you really can&#8217;t live without the legacy method, for one
+reason or another, worry not; Erlang.mk will support it. And
+if you need to create a new project that uses this method, you
+just have to say so when bootstrapping:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap-lib <span style="color: #009900">LEGACY</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_automatic_application_resource_file_values">Automatic application resource file values</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>When building the application resource file, Erlang.mk may
+automatically add an <code>id</code> key with information about the
+Git commit (if using Git), or an empty string otherwise.
+It will only do this under specific conditions:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+The application was built as a dependency of another, or
+</p>
+</li>
+<li>
+<p>
+The legacy method was used, and the <em>.app.src</em> file contained <code>{id, "git"}</code>
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This value is most useful when you need to help your users,
+as it allows you to know which version they run exactly by
+asking them to look in the file, or by running a simple
+command on their production server:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #993399">1</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #000000">application:get_all_key</span></span>(<span style="color: #FF6600">cowboy</span>)<span style="color: #990000">.</span>
+{<span style="color: #FF6600">ok</span>,[{<span style="color: #FF6600">description</span>,<span style="color: #FF0000">"Small, fast, modular HTTP server."</span>},
+ {<span style="color: #FF6600">id</span>,<span style="color: #FF0000">"2.0.0-pre.2-25-g0ffde50-dirty"</span>},</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_file_formats">File formats</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk supports a variety of different source file formats.
+The following formats are supported natively:</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Extension </th>
+<th align="center" valign="top"> Location </th>
+<th align="center" valign="top"> Description </th>
+<th align="center" valign="top"> Output</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">.erl</p></td>
+<td align="center" valign="top"><p class="table">src/</p></td>
+<td align="center" valign="top"><p class="table">Erlang source</p></td>
+<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.core</p></td>
+<td align="center" valign="top"><p class="table">src/</p></td>
+<td align="center" valign="top"><p class="table">Core Erlang source</p></td>
+<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.xrl</p></td>
+<td align="center" valign="top"><p class="table">src/</p></td>
+<td align="center" valign="top"><p class="table">Leex source</p></td>
+<td align="center" valign="top"><p class="table">src/*.erl</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.yrl</p></td>
+<td align="center" valign="top"><p class="table">src/</p></td>
+<td align="center" valign="top"><p class="table">Yecc source</p></td>
+<td align="center" valign="top"><p class="table">src/*.erl</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.asn1</p></td>
+<td align="center" valign="top"><p class="table">asn1/</p></td>
+<td align="center" valign="top"><p class="table">ASN.1 files</p></td>
+<td align="center" valign="top"><p class="table">include/<strong>.hrl include/</strong>.asn1db src/*.erl</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.mib</p></td>
+<td align="center" valign="top"><p class="table">mibs/</p></td>
+<td align="center" valign="top"><p class="table">SNMP MIB files</p></td>
+<td align="center" valign="top"><p class="table">include/<strong>.hrl priv/mibs/</strong>.bin</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>Files are always searched recursively.</p></div>
+<div class="paragraph"><p>The build is ordered, so that files that generate Erlang source
+files are run before, and the resulting Erlang source files are
+then built normally.</p></div>
+<div class="paragraph"><p>In addition, Erlang.mk keeps track of header files (<code>.hrl</code>)
+as described at the end of this chapter. It can also compile
+C code, as described in the <a href="../ports">NIFs and port drivers</a>
+chapter.</p></div>
+<div class="paragraph"><p>Erlang.mk also comes with plugins for the following formats:</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Extension </th>
+<th align="center" valign="top"> Location </th>
+<th align="center" valign="top"> Description </th>
+<th align="center" valign="top"> Output</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">.dtl</p></td>
+<td align="center" valign="top"><p class="table">templates/</p></td>
+<td align="center" valign="top"><p class="table">Django templates</p></td>
+<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">.proto</p></td>
+<td align="center" valign="top"><p class="table">src/</p></td>
+<td align="center" valign="top"><p class="table">Protocol buffers</p></td>
+<td align="center" valign="top"><p class="table">ebin/*.beam</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_compilation_options">Compilation options</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk provides a few variables that you can use to customize
+the build process and the resulting files.</p></div>
+<div class="sect3">
+<h4 id="_erlc_opts">ERLC_OPTS</h4>
+<div class="paragraph"><p><code>ERLC_OPTS</code> can be used to pass some options to <code>erlc</code>, the Erlang
+compiler. Erlang.mk does not restrict any option. Please refer to
+the <a href="http://www.erlang.org/doc/man/erlc.html">erlc Manual</a> for the
+full list.</p></div>
+<div class="paragraph"><p>By default, Erlang.mk will set the following options:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">ERLC_OPTS =</span> -Werror <span style="color: #990000">+</span>debug_info <span style="color: #990000">+</span>warn_export_vars <span style="color: #990000">+</span>warn_shadow_vars <span style="color: #990000">+</span>warn_obsolete_guard</tt></pre></div></div>
+<div class="paragraph"><p>In other words: warnings as errors, debug info (recommended) and
+enable warnings for exported variables, shadow variables and
+obsolete guard functions.</p></div>
+<div class="paragraph"><p>You can redefine this variable in your Makefile to change it
+completely, either before or after including Erlang.mk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">ERLC_OPTS =</span> <span style="color: #990000">+</span>debug_info</tt></pre></div></div>
+<div class="paragraph"><p>You can also filter out some options from the defaults Erlang.mk
+sets, by defining ERLC_OPTS after including Erlang.mk using the
+<code>:=</code> operator.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>include erlang.mk
+
+<span style="color: #990000">ERLC_OPTS :=</span> <span style="color: #009900">$(</span>filter-out -Werror<span style="color: #990000">,</span><span style="color: #009900">$(ERLC_OPTS))</span></tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_erlc_exclude">ERLC_EXCLUDE</h4>
+<div class="paragraph"><p><code>ERLC_EXCLUDE</code> can be used to exclude some modules from the
+compilation. It&#8217;s there for handling special cases, you should
+not normally need it.</p></div>
+<div class="paragraph"><p>To exclude a module, simply list it in the variable, either
+before or after including Erlang.mk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">ERLC_EXCLUDE =</span> cowboy_http2</tt></pre></div></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_cold_and_hot_builds">Cold and hot builds</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The first time you run <code>make</code>, Erlang.mk will build everything.</p></div>
+<div class="paragraph"><p>The second time you run <code>make</code>, and all subsequent times, Erlang.mk
+will only rebuild what changed. Erlang.mk has been optimized for
+this use case, as it is the most common during development.</p></div>
+<div class="paragraph"><p>Erlang.mk figures out what changed by using the dependency tracking
+feature of Make. Make automatically rebuilds a target if one of its
+dependency has changed (for example if a header file has changed,
+all the source files that include it will be rebuilt), and Erlang.mk
+leverages this feature to cut down on rebuild times.</p></div>
+<div class="paragraph"><p>Note that this applies only to building; some other features of
+Erlang.mk will run every time they are called regardless of files
+changed.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependency_tracking">Dependency tracking</h2>
+<div class="sectionbody">
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">This section is about the dependency tracking between files
+inside your project, not application dependencies.</td>
+</tr></table>
+</div>
+<div class="paragraph"><p>Erlang.mk keeps track of the dependencies between the different
+files in your project. This information is kept in the <em>$(PROJECT).d</em>
+file in your directory. It is generated if missing, and will be
+generated again after every file change, by default.</p></div>
+<div class="paragraph"><p>Dependency tracking is what allows Erlang.mk to know when to
+rebuild Erlang files when header files, behaviors or parse
+transforms have changed. Erlang.mk also automatically keeps
+track of which files should be compiled first, for example
+when you have behaviors used by other modules in your project.</p></div>
+<div class="paragraph"><p>If your project is stable, you may want to disable generating
+the dependency tracking file every time you compile. You can
+do this by adding the following line to your <em>Makefile</em>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>NO_MAKEDEP <span style="color: #990000">?=</span> <span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>As you can see, the snippet above uses <code>?=</code> instead of a
+simple equal sign. This is to allow you to temporarily override
+this value when you do make substantial changes to your project
+(including a new header file, new module with dependencies, etc.)
+and want to rebuild the dependency tracking file. You&#8217;ll be
+able to use the following command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ <span style="color: #009900">NO_MAKEDEP</span><span style="color: #990000">=</span> make</tt></pre></div></div>
+<div class="paragraph"><p>Otherwise, <code>make clean app</code> will of course force the
+recompilation of your project.</p></div>
+<div class="paragraph"><p>Erlang.mk can also keep track of the source files generated
+by other means, for example if you generate code from a data
+file in your repository.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_generating_erlang_source">Generating Erlang source</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk provides hooks at different stages of the build process.
+When your goal is to generate Erlang source files, you can
+add your own rules before or after the dependency tracking
+file is generated. To do this, you would add your hook before
+or after including the <em>erlang.mk</em> file.</p></div>
+<div class="paragraph"><p>The easiest way is after:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PROJECT =</span> example
+
+include erlang.mk
+
+<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
+
+src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
+ <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
+<div class="paragraph"><p>In this case we use <code>$(gen_verbose)</code> to hide the details of
+the build by default. Erlang.mk will simply say what file
+is it currently generating.</p></div>
+<div class="paragraph"><p>When using an external script to generate the Erlang source
+file, it is recommended to depend on that script, so that
+the source file gets generated again when the script gets
+modified.</p></div>
+<div class="paragraph"><p>If for whatever reason you prefer to hook before including
+Erlang.mk, don&#8217;t forget to set the <code>.DEFAULT_GOAL</code> variable,
+otherwise nothing will get built:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">PROJECT =</span> example
+
+.DEFAULT_GOAL <span style="color: #990000">=</span> all
+
+<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
+
+include erlang.mk
+
+src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
+ <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_cleaning">Cleaning</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Building typically involves creating a lot of new files. Some
+are reused in rebuilds, some are simply replaced. All can be
+removed safely.</p></div>
+<div class="paragraph"><p>Erlang.mk provides two commands to remove them: <code>clean</code> and
+<code>distclean</code>. <code>clean</code> removes all the intermediate files that
+were created as a result of building, including the BEAM files,
+the dependency tracking file and the generated documentation.
+<code>distclean</code> removes these and more, including the downloaded
+dependencies, Dialyzer&#8217;s PLT file and the generated release,
+putting your directory back to the state it was before you
+started working on it.</p></div>
+<div class="paragraph"><p>To clean:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make clean</tt></pre></div></div>
+<div class="paragraph"><p>Or distclean:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make distclean</tt></pre></div></div>
+<div class="paragraph"><p>That is the question.</p></div>
+<div class="paragraph"><p>Note that Erlang.mk will automatically clean some files as
+part of other targets, but it will never run <code>distclean</code> if
+you don&#8217;t explicitly use it.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/asciidoc.asciidoc b/docs/en/erlang.mk/1/guide/asciidoc.asciidoc
new file mode 100644
index 00000000..cc8336bf
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/asciidoc.asciidoc
@@ -0,0 +1,82 @@
+[[asciidoc]]
+== AsciiDoc documentation
+
+Erlang.mk provides rules for generating documentation from
+AsciiDoc files. It can automatically build a user guide PDF,
+chunked HTML documentation and Unix manual pages.
+
+=== Requirements
+
+It is necessary to have http://asciidoc.org/[AsciiDoc],
+http://xmlsoft.org/XSLT/xsltproc2.html[xsltproc] and
+http://dblatex.sourceforge.net/[dblatex] installed on your
+system for Erlang.mk to generate documentation from AsciiDoc sources.
+
+=== Writing AsciiDoc documentation
+
+http://asciidoc.org/[AsciiDoc] is a text document format for
+writing notes, documentation, articles, books, ebooks, slideshows,
+web pages, man pages and blogs. AsciiDoc files can be translated
+to many formats including HTML, PDF, EPUB, man page.
+
+The http://asciidoc.org/userguide.html[AsciiDoc user guide]
+describes the AsciiDoc syntax.
+
+The https://github.com/ninenines/erlang.mk/tree/master/doc/src/guide[Erlang.mk user guide]
+is written in AsciiDoc and can be used as an example. The entry
+file is https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc[book.asciidoc].
+
+Erlang.mk expects you to put your documentation in a specific
+location. This is 'doc/src/guide/' for the user guide, and
+'doc/src/manual/' for the function reference. In the case of
+the user guide, the entry point is always 'doc/src/guide/book.asciidoc'.
+
+For manual pages, it is good practice to use section 3 for
+modules, and section 7 for the application itself.
+
+=== Configuration
+
+All of the AsciiDoc related configuration can be done directly
+inside the files themselves.
+
+=== Usage
+
+To build all documentation:
+
+[source,bash]
+$ make docs
+
+To build only the AsciiDoc documentation:
+
+[source,bash]
+$ make asciidoc
+
+To build only the user guide:
+
+[source,bash]
+$ make asciidoc-guide
+
+To build only the manual:
+
+[source,bash]
+$ make asciidoc-manual
+
+To install man pages on Unix:
+
+[source,bash]
+$ make install-docs
+
+Erlang.mk allows customizing the installation path and sections
+of the man pages to be installed. The `MAN_INSTALL_PATH` variable
+defines where man pages will be installed. It defaults to
+'/usr/local/share/man'. The `MAN_SECTIONS` variable defines
+which manual sections are to be installed. It defaults to `3 7`.
+
+To install man pages to a custom location:
+
+[source,bash]
+$ make install-docs MAN_INSTALL_PATH=/opt/share/man
+
+Note that you may need to run the install commands using
+`sudo` or equivalent if the location is not writeable by
+your user.
diff --git a/docs/en/erlang.mk/1/guide/asciidoc/index.html b/docs/en/erlang.mk/1/guide/asciidoc/index.html
new file mode 100644
index 00000000..92bef918
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/asciidoc/index.html
@@ -0,0 +1,230 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: AsciiDoc documentation</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>AsciiDoc documentation</span></h1>
+
+<div class="paragraph"><p>Erlang.mk provides rules for generating documentation from
+AsciiDoc files. It can automatically build a user guide PDF,
+chunked HTML documentation and Unix manual pages.</p></div>
+<div class="sect1">
+<h2 id="_requirements">Requirements</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It is necessary to have <a href="http://asciidoc.org/">AsciiDoc</a>,
+<a href="http://xmlsoft.org/XSLT/xsltproc2.html">xsltproc</a> and
+<a href="http://dblatex.sourceforge.net/">dblatex</a> installed on your
+system for Erlang.mk to generate documentation from AsciiDoc sources.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_writing_asciidoc_documentation">Writing AsciiDoc documentation</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="http://asciidoc.org/">AsciiDoc</a> is a text document format for
+writing notes, documentation, articles, books, ebooks, slideshows,
+web pages, man pages and blogs. AsciiDoc files can be translated
+to many formats including HTML, PDF, EPUB, man page.</p></div>
+<div class="paragraph"><p>The <a href="http://asciidoc.org/userguide.html">AsciiDoc user guide</a>
+describes the AsciiDoc syntax.</p></div>
+<div class="paragraph"><p>The <a href="https://github.com/ninenines/erlang.mk/tree/master/doc/src/guide">Erlang.mk user guide</a>
+is written in AsciiDoc and can be used as an example. The entry
+file is <a href="https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc">book.asciidoc</a>.</p></div>
+<div class="paragraph"><p>Erlang.mk expects you to put your documentation in a specific
+location. This is <em>doc/src/guide/</em> for the user guide, and
+<em>doc/src/manual/</em> for the function reference. In the case of
+the user guide, the entry point is always <em>doc/src/guide/book.asciidoc</em>.</p></div>
+<div class="paragraph"><p>For manual pages, it is good practice to use section 3 for
+modules, and section 7 for the application itself.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All of the AsciiDoc related configuration can be done directly
+inside the files themselves.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To build all documentation:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make docs</tt></pre></div></div>
+<div class="paragraph"><p>To build only the AsciiDoc documentation:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make asciidoc</tt></pre></div></div>
+<div class="paragraph"><p>To build only the user guide:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make asciidoc-guide</tt></pre></div></div>
+<div class="paragraph"><p>To build only the manual:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make asciidoc-manual</tt></pre></div></div>
+<div class="paragraph"><p>To install man pages on Unix:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make install-docs</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk allows customizing the installation path and sections
+of the man pages to be installed. The <code>MAN_INSTALL_PATH</code> variable
+defines where man pages will be installed. It defaults to
+<em>/usr/local/share/man</em>. The <code>MAN_SECTIONS</code> variable defines
+which manual sections are to be installed. It defaults to <code>3 7</code>.</p></div>
+<div class="paragraph"><p>To install man pages to a custom location:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make install-docs <span style="color: #009900">MAN_INSTALL_PATH</span><span style="color: #990000">=</span>/opt/share/man</tt></pre></div></div>
+<div class="paragraph"><p>Note that you may need to run the install commands using
+<code>sudo</code> or equivalent if the location is not writeable by
+your user.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/ci.asciidoc b/docs/en/erlang.mk/1/guide/ci.asciidoc
new file mode 100644
index 00000000..24cfc053
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/ci.asciidoc
@@ -0,0 +1,6 @@
+[[ci]]
+== Continuous integration
+
+// @todo Write it.
+
+Placeholder chapter.
diff --git a/docs/en/erlang.mk/1/guide/ci/index.html b/docs/en/erlang.mk/1/guide/ci/index.html
new file mode 100644
index 00000000..aedef405
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/ci/index.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Continuous integration</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Continuous integration</span></h1>
+
+<div class="paragraph"><p>Placeholder chapter.</p></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/common_test.asciidoc b/docs/en/erlang.mk/1/guide/common_test.asciidoc
new file mode 100644
index 00000000..aec8747e
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/common_test.asciidoc
@@ -0,0 +1,91 @@
+[[ct]]
+== Common Test
+
+Common Test is Erlang's functional testing framework.
+Erlang.mk automates the discovery and running of Common
+Test suites.
+
+=== Writing tests
+
+The http://www.erlang.org/doc/apps/common_test/write_test_chapter.html[Common Test user guide]
+is the best place to learn how to write tests. Erlang.mk
+requires that file names for test suites end with '_SUITE.erl'
+and that the files be located in the '$(TEST_DIR)' directory.
+This defaults to 'test/'.
+
+=== Configuration
+
+The `CT_OPTS` variable allows you to set extra Common Test
+options. Options are documented in the
+http://www.erlang.org/doc/apps/common_test/run_test_chapter.html[Common Test user guide].
+You can use it to set Common Test hooks, for example:
+
+[source,make]
+CT_OPTS = -ct_hooks cowboy_ct_hook
+
+The `CT_SUITES` variable can be used to override what
+Common Test suites Erlang.mk will be aware of. It does
+not normally need to be set as Erlang.mk will find the
+test suites automatically.
+
+The name of the suite is the part before `_SUITE.erl`.
+If the file is named 'http_SUITE.erl', the test suite
+is `http`:
+
+[source,make]
+CT_SUITES = http ws
+
+=== Usage
+
+To run all tests (including Common Test):
+
+[source,bash]
+$ make tests
+
+To run all tests and static checks (including Common Test):
+
+[source,bash]
+$ make check
+
+You can also run Common Test separately:
+
+[source,bash]
+$ make ct
+
+Erlang.mk will create targets for all test suites it finds.
+If you have a file named 'test/http_SUITE.erl', then the
+target `ct-http` will run that specific test suite:
+
+[source,bash]
+$ make ct-http
+
+Erlang.mk provides a convenient way to run a specific
+group or a specific test case within a specific group,
+using the variable `t`. Note that this only applies to
+suite-specific targets, like the `ct-http` example above.
+
+To run all tests from the `http_compress` group in the
+`http_SUITE` test suite, write:
+
+[source,bash]
+$ make ct-http t=http_compress
+
+Similarly, to run a specific test case in that group:
+
+[source,bash]
+$ make ct-http t=http_compress:headers_dupe
+
+To do the same against a multi-application repository,
+you can use the `-C` option:
+
+[source,bash]
+$ make -C apps/my_app ct-http t=my_group:my_case
+
+Note that this also applies to dependencies. When using Cowboy
+as a dependency, you can run the following directly:
+
+[source,bash]
+$ make -C deps/cowboy ct-http t=http_compress
+
+Finally, xref:coverage[code coverage] is available,
+but covered in its own chapter.
diff --git a/docs/en/erlang.mk/1/guide/common_test/index.html b/docs/en/erlang.mk/1/guide/common_test/index.html
new file mode 100644
index 00000000..aae734f1
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/common_test/index.html
@@ -0,0 +1,249 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Common Test</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Common Test</span></h1>
+
+<div class="paragraph"><p>Common Test is Erlang&#8217;s functional testing framework.
+Erlang.mk automates the discovery and running of Common
+Test suites.</p></div>
+<div class="sect1">
+<h2 id="_writing_tests">Writing tests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/common_test/write_test_chapter.html">Common Test user guide</a>
+is the best place to learn how to write tests. Erlang.mk
+requires that file names for test suites end with <em>_SUITE.erl</em>
+and that the files be located in the <em>$(TEST_DIR)</em> directory.
+This defaults to <em>test/</em>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>CT_OPTS</code> variable allows you to set extra Common Test
+options. Options are documented in the
+<a href="http://www.erlang.org/doc/apps/common_test/run_test_chapter.html">Common Test user guide</a>.
+You can use it to set Common Test hooks, for example:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">CT_OPTS =</span> -ct_hooks cowboy_ct_hook</tt></pre></div></div>
+<div class="paragraph"><p>The <code>CT_SUITES</code> variable can be used to override what
+Common Test suites Erlang.mk will be aware of. It does
+not normally need to be set as Erlang.mk will find the
+test suites automatically.</p></div>
+<div class="paragraph"><p>The name of the suite is the part before <code>_SUITE.erl</code>.
+If the file is named <em>http_SUITE.erl</em>, the test suite
+is <code>http</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">CT_SUITES =</span> http ws</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To run all tests (including Common Test):</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make tests</tt></pre></div></div>
+<div class="paragraph"><p>To run all tests and static checks (including Common Test):</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make check</tt></pre></div></div>
+<div class="paragraph"><p>You can also run Common Test separately:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make ct</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk will create targets for all test suites it finds.
+If you have a file named <em>test/http_SUITE.erl</em>, then the
+target <code>ct-http</code> will run that specific test suite:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make ct-http</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk provides a convenient way to run a specific
+group or a specific test case within a specific group,
+using the variable <code>t</code>. Note that this only applies to
+suite-specific targets, like the <code>ct-http</code> example above.</p></div>
+<div class="paragraph"><p>To run all tests from the <code>http_compress</code> group in the
+<code>http_SUITE</code> test suite, write:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress</tt></pre></div></div>
+<div class="paragraph"><p>Similarly, to run a specific test case in that group:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress<span style="color: #990000">:</span>headers_dupe</tt></pre></div></div>
+<div class="paragraph"><p>To do the same against a multi-application repository,
+you can use the <code>-C</code> option:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -C apps/my_app ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>my_group<span style="color: #990000">:</span>my_case</tt></pre></div></div>
+<div class="paragraph"><p>Note that this also applies to dependencies. When using Cowboy
+as a dependency, you can run the following directly:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -C deps/cowboy ct-http <span style="color: #009900">t</span><span style="color: #990000">=</span>http_compress</tt></pre></div></div>
+<div class="paragraph"><p>Finally, <a href="../coverage">code coverage</a> is available,
+but covered in its own chapter.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/compat.asciidoc b/docs/en/erlang.mk/1/guide/compat.asciidoc
new file mode 100644
index 00000000..8c8f935c
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/compat.asciidoc
@@ -0,0 +1,90 @@
+[[compat]]
+== Compatibility with other build tools
+
+Erlang.mk tries its best to be compatible with the other Erlang
+build tools. It can use dependencies written with other build
+tools in mind, and can also make your projects usable by those
+build tools as well. Erlang.mk is like the cool kid that gets
+along with everybody.
+
+In this chapter I will use the term _Rebar project_ to refer
+to a project built using Rebar 2, Rebar 3 or Mad. These three
+build tools are very similar and share the same configuration
+file.
+
+=== Rebar projects as Erlang.mk dependencies
+
+Erlang.mk comes with a feature called _Autoload_ which will
+use Rebar 2 to patch any Rebar project and make it compatible
+with Erlang.mk. This feature essentially patches Rebar out
+and adds a Makefile to the project that Erlang.mk can then
+use for building:
+
+_Autoload_ is documented in more details in the
+xref:deps[Packages and dependencies] chapter.
+
+=== Erlang.mk projects as Rebar dependencies
+
+Erlang.mk projects can be made compatible with the Rebar family
+of build tools pretty easily, as Erlang.mk will generate
+all the files they require for building.
+
+The Rebar family requires two files: a 'rebar.config' file
+containing compilation options and the list of dependencies,
+and the application resource file, found either at
+'ebin/$(PROJECT).app' or at 'src/$(PROJECT).app.src'.
+
+==== Rebar configuration
+
+Erlang.mk comes with a target that generates a 'rebar.config'
+file when invoked:
+
+[source,bash]
+$ make rebar.config
+
+Careful! This will build the file even if it already existed
+before.
+
+To build this file, Erlang.mk uses information it finds in
+the `DEPS` and `ERLC_OPTS` variables, among others. This
+means that the Rebar family builds your project much the
+same way as Erlang.mk.
+
+// @todo Sanity check chapter.
+Careful though! Different build tools have different fetching
+strategies. If some applications provide differing dependencies,
+they might be fetched differently by other build tools. Check
+the upcoming Sanity check chapter to find out how to detect such
+issues.
+
+You can automatically generate this file when you build
+your application, by making it a dependency of the `app`
+target:
+
+[source,make]
+----
+app:: rebar.config
+----
+
+Don't forget to commit the file when it changes!
+
+If you run into other issues, it's probably because you use a
+feature specific to Erlang.mk, like the `cp` fetch method.
+It could also be that we forgot to handle something! Sorry.
+We are of course interested to hear about any compatibility
+problems you may have, just open a ticket!
+
+==== Application resource file
+
+Erlang.mk has two ways to generate an application resource
+file: from the information found in the Makefile, or from
+the information found in the 'src/$(PROJECT).app.src' file.
+Needless to say, if you have this file in your repository,
+then you don't need to worry about compatibility with other
+build tools.
+
+If you don't, however, it's not much harder. Every time
+Erlang.mk will compile your application, it will produce
+a new 'ebin/$(PROJECT).app' file. Simply commit this file
+when it changes. It will only change when you modify the
+configuration, add or remove modules.
diff --git a/docs/en/erlang.mk/1/guide/compat/index.html b/docs/en/erlang.mk/1/guide/compat/index.html
new file mode 100644
index 00000000..6202c6a2
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/compat/index.html
@@ -0,0 +1,220 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Compatibility with other build tools</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Compatibility with other build tools</span></h1>
+
+<div class="paragraph"><p>Erlang.mk tries its best to be compatible with the other Erlang
+build tools. It can use dependencies written with other build
+tools in mind, and can also make your projects usable by those
+build tools as well. Erlang.mk is like the cool kid that gets
+along with everybody.</p></div>
+<div class="paragraph"><p>In this chapter I will use the term <em>Rebar project</em> to refer
+to a project built using Rebar 2, Rebar 3 or Mad. These three
+build tools are very similar and share the same configuration
+file.</p></div>
+<div class="sect1">
+<h2 id="_rebar_projects_as_erlang_mk_dependencies">Rebar projects as Erlang.mk dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk comes with a feature called <em>Autoload</em> which will
+use Rebar 2 to patch any Rebar project and make it compatible
+with Erlang.mk. This feature essentially patches Rebar out
+and adds a Makefile to the project that Erlang.mk can then
+use for building:</p></div>
+<div class="paragraph"><p><em>Autoload</em> is documented in more details in the
+<a href="../deps">Packages and dependencies</a> chapter.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_projects_as_rebar_dependencies">Erlang.mk projects as Rebar dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk projects can be made compatible with the Rebar family
+of build tools pretty easily, as Erlang.mk will generate
+all the files they require for building.</p></div>
+<div class="paragraph"><p>The Rebar family requires two files: a <em>rebar.config</em> file
+containing compilation options and the list of dependencies,
+and the application resource file, found either at
+<em>ebin/$(PROJECT).app</em> or at <em>src/$(PROJECT).app.src</em>.</p></div>
+<div class="sect3">
+<h4 id="_rebar_configuration">Rebar configuration</h4>
+<div class="paragraph"><p>Erlang.mk comes with a target that generates a <em>rebar.config</em>
+file when invoked:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make rebar<span style="color: #990000">.</span>config</tt></pre></div></div>
+<div class="paragraph"><p>Careful! This will build the file even if it already existed
+before.</p></div>
+<div class="paragraph"><p>To build this file, Erlang.mk uses information it finds in
+the <code>DEPS</code> and <code>ERLC_OPTS</code> variables, among others. This
+means that the Rebar family builds your project much the
+same way as Erlang.mk.</p></div>
+<div class="paragraph"><p>Careful though! Different build tools have different fetching
+strategies. If some applications provide differing dependencies,
+they might be fetched differently by other build tools. Check
+the upcoming Sanity check chapter to find out how to detect such
+issues.</p></div>
+<div class="paragraph"><p>You can automatically generate this file when you build
+your application, by making it a dependency of the <code>app</code>
+target:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #990000">app::</span> rebar.config</tt></pre></div></div>
+<div class="paragraph"><p>Don&#8217;t forget to commit the file when it changes!</p></div>
+<div class="paragraph"><p>If you run into other issues, it&#8217;s probably because you use a
+feature specific to Erlang.mk, like the <code>cp</code> fetch method.
+It could also be that we forgot to handle something! Sorry.
+We are of course interested to hear about any compatibility
+problems you may have, just open a ticket!</p></div>
+</div>
+<div class="sect3">
+<h4 id="_application_resource_file">Application resource file</h4>
+<div class="paragraph"><p>Erlang.mk has two ways to generate an application resource
+file: from the information found in the Makefile, or from
+the information found in the <em>src/$(PROJECT).app.src</em> file.
+Needless to say, if you have this file in your repository,
+then you don&#8217;t need to worry about compatibility with other
+build tools.</p></div>
+<div class="paragraph"><p>If you don&#8217;t, however, it&#8217;s not much harder. Every time
+Erlang.mk will compile your application, it will produce
+a new <em>ebin/$(PROJECT).app</em> file. Simply commit this file
+when it changes. It will only change when you modify the
+configuration, add or remove modules.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/contributing.asciidoc b/docs/en/erlang.mk/1/guide/contributing.asciidoc
new file mode 100644
index 00000000..58e5de68
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/contributing.asciidoc
@@ -0,0 +1,116 @@
+[[contributing]]
+== Contributing
+
+You are welcome and encouraged to contribute.
+
+This is how.
+
+=== Priorities
+
+From the most important to the least important:
+
+* Bugs
+* Package issues/additions
+* Refactoring
+* Features
+
+=== Bugs
+
+If you have found a bug, you should open a ticket. Include
+everything relevant including the command you used, output,
+a link to the code that triggers the issue, why you think
+this is a bug, etc.
+
+If you think you have found a bug but you are not sure, you
+should open a ticket as previously explained.
+
+If you have found a bug and you need it to be solved RIGHT
+NOW, open a ticket as previously explained.
+
+Once you have opened a ticket, be patient, try to answer
+questions in a timely manner and confirm that the bug was
+indeed fixed when it is.
+
+If you can't be patient, either try to solve the bug and
+contribute the fix back or become a paying customer.
+
+=== Code
+
+The code is located in the 'core/\*.mk' and 'plugins/\*.mk' files.
+The tests are located in the 'test/Makefile' and 'test/*.mk' files.
+
+If you have a fix or a hack for a bug, you should open a
+pull request. Any fix should include a test case that fails
+before the fix and is working after.
+
+If you have a test case that reproduces a bug, but no fix for
+it, you should open a pull request.
+
+Changes need to be tested with at least the `make check`
+command. A specific test case can be tested using `make check c=CASE`
+with `CASE` the name of the target to run. Output can be
+modulated using the `V` variable, which is an integer
+from 0 to 4. A typical use would be `make check c=dialyzer V=3`.
+The value 4 is particular and shows expanded commands right
+before they are executed.
+
+To run tests in parallel, use the `-j` option. It is generally
+a good idea to also use the `-k` option to run all tests even
+if one fails. For example: `make check -j 32 -k`.
+
+Some changes should be tested against all packages. Continue
+reading for more details on testing them.
+
+=== Packages
+
+You can search existing packages using the `make search q=STRING`
+command. This can be done both from an Erlang.mk project or
+directly from the Erlang.mk repository.
+
+Packages can be added to the index using the `pkg_add.sh` script.
+
+[source,bash]
+----
+$ git clone https://github.com/$YOURUSERNAME/erlang.mk
+$ cd erlang.mk
+$ ./pkg_add.sh cowboy git https://github.com/ninenines/cowboy 1.0.0
+ http://ninenines.eu "Small, fast and modular HTTP server."
+$ git push origin master
+----
+
+Before sending a pull request, you should test your package.
+You can use the following command: `make check p=PACKAGE`,
+where `PACKAGE` is the name of the package, for example
+`cowboy`.
+
+To test all packages, the `make packages` command can be used.
+This can take a long time. Some packages will fail with certain
+versions of Erlang, or if a prerequisite is missing from your system.
+You can of course speed things up using the `-j` and `-k` flags.
+
+After all packages have been tested, you can run the command
+`make summary` to know what changed since the previous run.
+
+=== Documentation
+
+The documentation is always right.
+
+If you think you have found a mistake in the documentation,
+this is a bug. You can either open a ticket or send a pull
+request.
+
+To make sure that the documentation changes work, install
+the listed xref:asciidoc[Requirements] on your system and
+run `make docs`.
+
+=== Feature requests
+
+If you have an awesome idea or need something that Erlang.mk
+doesn't provide yet, open a ticket. Provide as much detail as
+possible.
+
+If you have code, great! Open a pull request as previously
+explained.
+
+If not, you can still improve your feature request by writing
+the related documentation.
diff --git a/docs/en/erlang.mk/1/guide/contributing/index.html b/docs/en/erlang.mk/1/guide/contributing/index.html
new file mode 100644
index 00000000..a8f35389
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/contributing/index.html
@@ -0,0 +1,261 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Contributing</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Contributing</span></h1>
+
+<div class="paragraph"><p>You are welcome and encouraged to contribute.</p></div>
+<div class="paragraph"><p>This is how.</p></div>
+<div class="sect1">
+<h2 id="_priorities">Priorities</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>From the most important to the least important:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Bugs
+</p>
+</li>
+<li>
+<p>
+Package issues/additions
+</p>
+</li>
+<li>
+<p>
+Refactoring
+</p>
+</li>
+<li>
+<p>
+Features
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_bugs">Bugs</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you have found a bug, you should open a ticket. Include
+everything relevant including the command you used, output,
+a link to the code that triggers the issue, why you think
+this is a bug, etc.</p></div>
+<div class="paragraph"><p>If you think you have found a bug but you are not sure, you
+should open a ticket as previously explained.</p></div>
+<div class="paragraph"><p>If you have found a bug and you need it to be solved RIGHT
+NOW, open a ticket as previously explained.</p></div>
+<div class="paragraph"><p>Once you have opened a ticket, be patient, try to answer
+questions in a timely manner and confirm that the bug was
+indeed fixed when it is.</p></div>
+<div class="paragraph"><p>If you can&#8217;t be patient, either try to solve the bug and
+contribute the fix back or become a paying customer.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_code">Code</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The code is located in the <em>core/*.mk</em> and <em>plugins/*.mk</em> files.
+The tests are located in the <em>test/Makefile</em> and <em>test/*.mk</em> files.</p></div>
+<div class="paragraph"><p>If you have a fix or a hack for a bug, you should open a
+pull request. Any fix should include a test case that fails
+before the fix and is working after.</p></div>
+<div class="paragraph"><p>If you have a test case that reproduces a bug, but no fix for
+it, you should open a pull request.</p></div>
+<div class="paragraph"><p>Changes need to be tested with at least the <code>make check</code>
+command. A specific test case can be tested using <code>make check c=CASE</code>
+with <code>CASE</code> the name of the target to run. Output can be
+modulated using the <code>V</code> variable, which is an integer
+from 0 to 4. A typical use would be <code>make check c=dialyzer V=3</code>.
+The value 4 is particular and shows expanded commands right
+before they are executed.</p></div>
+<div class="paragraph"><p>To run tests in parallel, use the <code>-j</code> option. It is generally
+a good idea to also use the <code>-k</code> option to run all tests even
+if one fails. For example: <code>make check -j 32 -k</code>.</p></div>
+<div class="paragraph"><p>Some changes should be tested against all packages. Continue
+reading for more details on testing them.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_packages">Packages</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can search existing packages using the <code>make search q=STRING</code>
+command. This can be done both from an Erlang.mk project or
+directly from the Erlang.mk repository.</p></div>
+<div class="paragraph"><p>Packages can be added to the index using the <code>pkg_add.sh</code> script.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com<span style="color: #990000">/</span><span style="color: #009900">$YOURUSERNAME</span>/erlang<span style="color: #990000">.</span>mk
+$ cd erlang<span style="color: #990000">.</span>mk
+$ <span style="color: #990000">.</span>/pkg_add<span style="color: #990000">.</span>sh cowboy git https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/cowboy <span style="color: #993399">1.0</span><span style="color: #990000">.</span><span style="color: #993399">0</span>
+ http<span style="color: #990000">:</span>//ninenines<span style="color: #990000">.</span>eu <span style="color: #FF0000">"Small, fast and modular HTTP server."</span>
+$ git push origin master</tt></pre></div></div>
+<div class="paragraph"><p>Before sending a pull request, you should test your package.
+You can use the following command: <code>make check p=PACKAGE</code>,
+where <code>PACKAGE</code> is the name of the package, for example
+<code>cowboy</code>.</p></div>
+<div class="paragraph"><p>To test all packages, the <code>make packages</code> command can be used.
+This can take a long time. Some packages will fail with certain
+versions of Erlang, or if a prerequisite is missing from your system.
+You can of course speed things up using the <code>-j</code> and <code>-k</code> flags.</p></div>
+<div class="paragraph"><p>After all packages have been tested, you can run the command
+<code>make summary</code> to know what changed since the previous run.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_documentation">Documentation</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The documentation is always right.</p></div>
+<div class="paragraph"><p>If you think you have found a mistake in the documentation,
+this is a bug. You can either open a ticket or send a pull
+request.</p></div>
+<div class="paragraph"><p>To make sure that the documentation changes work, install
+the listed <a href="../asciidoc">Requirements</a> on your system and
+run <code>make docs</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_feature_requests">Feature requests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you have an awesome idea or need something that Erlang.mk
+doesn&#8217;t provide yet, open a ticket. Provide as much detail as
+possible.</p></div>
+<div class="paragraph"><p>If you have code, great! Open a pull request as previously
+explained.</p></div>
+<div class="paragraph"><p>If not, you can still improve your feature request by writing
+the related documentation.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/coverage.asciidoc b/docs/en/erlang.mk/1/guide/coverage.asciidoc
new file mode 100644
index 00000000..f33f8783
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/coverage.asciidoc
@@ -0,0 +1,6 @@
+[[coverage]]
+== Code coverage
+
+// @todo Write it.
+
+Placeholder chapter.
diff --git a/docs/en/erlang.mk/1/guide/coverage/index.html b/docs/en/erlang.mk/1/guide/coverage/index.html
new file mode 100644
index 00000000..0be003b8
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/coverage/index.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Code coverage</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Code coverage</span></h1>
+
+<div class="paragraph"><p>Placeholder chapter.</p></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/deps.asciidoc b/docs/en/erlang.mk/1/guide/deps.asciidoc
new file mode 100644
index 00000000..eb6f2f0c
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/deps.asciidoc
@@ -0,0 +1,472 @@
+[[deps]]
+== Packages and dependencies
+
+Erlang.mk can fetch and compile the dependencies that your
+project requires. Erlang.mk improves upon the concepts
+introduced by Rebar, so they should be familiar to many
+seasoned Erlang developers.
+
+Erlang.mk is not a package manager, nor is it trying to be,
+but it does include an index of Erlang packages to make
+discovering useful projects easier.
+
+This chapter will explain how to use packages, add
+dependencies to your project or bundle them directly
+in a single repository.
+
+=== Searching packages
+
+Erlang.mk gives you access to nearly 500 packages, with more
+being added regularly.
+
+To find a package, search for it:
+
+[source,bash]
+$ make search q=pool
+
+This will return all packages matching this word, like worker
+pool and acceptor pool projects.
+
+You can also list everything and use regular command line
+tools to find what you need, for example:
+
+[source,bash]
+$ make search | less
+
+// @todo Simplify adding packages, add a new chapter explaining
+// everything, then link to this new chapter from here.
+
+=== Adding dependencies to your project
+
+Once you find the package you need, adding it as a dependency
+to your project is a one-liner:
+
+[source,make]
+DEPS = cowboy
+
+And that's it! The next time you run `make`, Erlang.mk will
+fetch and compile Cowboy. Erlang.mk will also ensure Cowboy
+is available whenever you use the shell, run tests and any
+other operations.
+
+Erlang.mk will fill in the application resource file with
+all applications found in `DEPS`. But not all dependencies
+are Erlang applications, and not all dependencies need to
+be a runtime dependency. That's where the `BUILD_DEPS`
+variable comes in: it works just like `DEPS`, except the
+dependencies listed there will not be added as runtime
+dependencies.
+
+For example, you could add a parse transform project like
+this to make it available only at build time:
+
+[source,make]
+BUILD_DEPS = erlando
+
+Or you could depend on a C project directly, if you are
+building a NIF:
+
+[source,make]
+BUILD_DEPS = leveldb
+dep_leveldb = git https://github.com/basho/leveldb 2.1.3
+
+This dependency will be built before your application, so
+you could easily copy the resulting shared file into your
+'priv/' directory as part of the build process. More information
+about that in the xref:ports[NIFs and port drivers]
+chapter.
+
+Another variable, `LOCAL_DEPS`, allows specifying runtime
+dependencies which are part of Erlang/OTP itself, but also
+dependencies that are included in the repository. Since they
+are already on your system, there is no need to fetch them.
+Do note that there is no way to choose the version, the
+application used will be the one already on your system.
+
+You could depend on the Crypto application, for example:
+
+[source,make]
+LOCAL_DEPS = crypto
+
+Erlang.mk comes with additional types of dependencies.
+It has `TEST_DEPS` for dependencies used only for testing:
+
+[source,make]
+TEST_DEPS = ct_helper
+dep_ct_helper = git https://github.com/ninenines/ct_helper master
+
+`DOC_DEPS` for dependencies used only when building documentation:
+
+[source,make]
+DOC_DEPS = edown
+
+`REL_DEPS` for dependencies required to build the release,
+or to include extra applications in the release:
+
+[source,make]
+REL_DEPS = recon
+
+And `SHELL_DEPS` for dependencies to make available when running
+the `make shell` command:
+
+[source,make]
+SHELL_DEPS = tddreloader
+
+All these will be documented in more details in their respective
+chapters.
+
+==== Modifying the dependency source or version
+
+By default, Erlang.mk will look into its package index to
+find the project you are looking for, if you only provide
+its name. This is this case:
+
+[source,make]
+DEPS = cowboy
+
+If you need a different version, you need to define another
+variable. There are two ways to do this, each being useful
+for different reasons.
+
+If you simply want to change the commit number, all you
+need to do is to define the `dep_$(DEP_NAME)_commit`
+variable. In the case of Cowboy, this would look like this:
+
+[source,make]
+DEPS = cowboy
+dep_cowboy_commit = 2.0.0-pre.2
+
+Erlang.mk will use the package index to get all information
+about Cowboy, except the commit number which will be overriden.
+
+If you need to set the fetch method or repository information
+too, for example because you want to use your own fork, or
+simply because the project is missing from the index, you
+can define the `dep_$(DEP_NAME)` variable with everything:
+
+[source,make]
+DEPS = cowboy
+dep_cowboy = git https://github.com/essen/cowboy 2.0.0-pre.2
+
+This will fetch Cowboy from your fork at the given commit.
+
+==== Fetch methods
+
+Erlang.mk comes with a number of different fetch methods.
+You can fetch from Git, Mercurial, SVN, to name a few.
+There are fetch methods that will work everywhere, and
+fetch methods that will only work in a given environment.
+
+The following table lists all existing methods:
+
+[cols="<,2*^",options="header"]
+|===
+| Name | Format | Description
+| git | git repo commit | Clone the Git repository and checkout the given version
+| git-submodule | git-submodule | Initialize and update the Git submodule
+| hg | hg repo commit | Clone the Mercurial repository and update to the given version
+| svn | svn repo | Checkout the given SVN repository
+| cp | cp path/to/repo | Recursively copy a local directory
+| hex | hex version | Download the given project version from hex.pm
+| fail | N/A | Always fail, reserved for internal use
+| legacy | N/A | Legacy Erlang.mk fetcher, reserved for internal use
+|===
+
+The `git` and `hg` methods both have a repository and commit.
+You can use any valid commit, tag or branch in that repository
+for the commit value.
+
+For example, to fetch Cowboy with tag 2.0.0-pre.2 from Git:
+
+[source,make]
+dep_cowboy = git https://github.com/ninenines/cowboy 2.0.0-pre.2
+
+Or to fetch Ehsa tag 4.0.3 from Mercurial:
+
+[source,make]
+dep_ehsa = hg https://bitbucket.org/a12n/ehsa 4.0.3
+
+Git also comes with a concept of submodules. Erlang.mk can
+automatically initializes and updates submodules for dependencies,
+as long as they were added beforehand using `git submodule add`:
+
+[source,make]
+dep_cowboy = git-submodule
+
+The `svn` method only has a repository value, but that's
+simply because the SVN repository URL can also contain
+the path and commit.
+
+This would fetch an example project from the trunk:
+
+[source,make]
+dep_ex1 = svn https://example.com/svn/trunk/project/ex1
+
+And this would fetch a separate example project from a
+specific commit:
+
+[source,make]
+dep_ex2 = svn svn://example.com/svn/branches/erlang-proj/ex2@264
+
+You can copy a directory from your machine using the `cp` method.
+It only takes the path to copy from:
+
+[source,make]
+dep_cowboy = cp $(HOME)/ninenines/cowboy
+
+Finally, you can use a package from the
+link:https://hex.pm/[Hex repository]:
+
+[source,make]
+dep_cowboy = hex 1.0.3
+
+==== Custom fetch methods
+
+If none of the existing methods fit your use, you can simply
+define your own. Erlang.mk will consider all variables that
+are named as `dep_fetch_$(METHOD)` to be available fetch
+methods. You can do anything inside this variable, as long
+as you create a folder named '$(DEPS_DIR)/$(call dep_name,$1)'.
+Or in layman terms, if your dependency is Cowboy, this would
+become 'deps/cowboy'.
+
+To give an example, this is what the Git method does:
+
+[source,make]
+----
+define dep_fetch_git
+ git clone -q -n -- $(call dep_repo,$1) $(DEPS_DIR)/$(call dep_name,$1); \
+ cd $(DEPS_DIR)/$(call dep_name,$1) && git checkout -q $(call dep_commit,$1);
+endef
+----
+
+Note that, like dependency information, this custom fetch method
+must be written before including 'erlang.mk'.
+
+=== How deps are fetched and built
+
+The order in which dependencies are fetched and built is well
+defined. This means that Erlang.mk will get the same applications
+regardless of the command or options being used.
+
+In tree traversal terms, where the list of dependencies is a
+tree, Erlang.mk fetches everything using the pre-order traversal
+method. The steps can be summarized like this, starting from
+the root application:
+
+. Fetch all dependencies for the application
+. Build first dependency
+. Build Nth dependency
+. Build last dependency
+
+Every time a dependency is built, these same steps are followed,
+recursively.
+
+Do note that the first step, fetching all dependencies of
+an application, is not guaranteed to be ordered. The reason
+for this is that it is not possible to have the same dependency
+listed twice in a single application, and therefore there can
+be no conflicts. Remember, this step only fetches, at no point
+are different applications built in parallel.
+
+What about conflicts between the dependencies of different
+applications? Simple. Since builds are ordered, this means
+that the first version of an application that is fetched
+will be the one that wins.
+
+This means that if project A depends on projects B and C,
+in this order, and that both B and C depend on a different
+version of D, it will always be B's version of D that wins,
+because we fetch the dependencies of B before fetching
+those from C.
+
+Similarly, if project A depends on projects B, C and D,
+regardless of the order, and A, B and C depend on a
+different version of D, it will always be A's version
+that wins, because we fetch all dependencies of A before
+fetching those from B or C.
+
+=== Ignoring unwanted dependencies
+
+Sometimes, you may want to ignore dependencies entirely.
+Not even fetch them. You may want to do this because a
+project you depend on depends on an application you do
+not need (like a dependency for building documentation
+or testing). Or maybe the dependency is already installed
+on your system.
+
+To ignore a dependency, simply add it to the `IGNORE_DEPS`
+variable:
+
+[source,make]
+IGNORE_DEPS += edown proper
+
+This will only ignore dependencies that are needed for
+building. It is therefore safe to write:
+
+[source,make]
+IGNORE_DEPS += edown proper
+TEST_DEPS = proper
+
+The PropEr application will be fetched as intended when
+running `make tests` or `make check`. It will however
+not be fetched when running `make` or `make deps`.
+
+=== Dependencies directory
+
+Dependencies are fetched in '$(DEPS_DIR)'. By default this is
+the 'deps' directory. You can change this default, but you
+should only do so if it was not defined previously. Erlang.mk
+uses this variable to tell dependencies where to fetch their
+own dependencies.
+
+You will therefore need to use `?=` instead of `=`. Of course,
+if you know you will never use this project as a dependency,
+`=` will work. But to avoid it biting you later on, do this:
+
+[source,make]
+DEPS_DIR ?= $(CURDIR)/libs
+
+The `$(CURDIR)` part is important, otherwise dependencies of
+dependencies will be fetched in the wrong directory.
+
+Erlang.mk will also export the `REBAR_DEPS_DIR` variable for
+compatibility with Rebar build tools, as long as they are
+recent enough.
+
+=== Many applications in one repository
+
+In addition to the dependencies that are fetched, Erlang.mk
+also allows you to have dependencies local to your repository.
+This kind of layout is sometimes called multi-application
+repositories, or repositories with multiple applications.
+
+They work exactly the same as remote dependencies, except:
+
+* They are not fetched
+* They are not autopatched
+* They are not deleted on `make distclean`
+* They are not automatically added to the application resource file
+
+To properly fill the application resource file, you will
+need to define the `LOCAL_DEPS` variable for each relevant
+application, the same as for OTP applications.
+
+If there is a conflict between a local dependency and a
+remote dependency, then the local dependency always wins;
+an error will be triggered when trying to fetch the
+conflicting remote dependency.
+
+To start using dependencies local to the repository, simply
+create a folder named '$(APPS_DIR)'. By default, this folder
+is the 'apps/' directory.
+
+You can use Erlang.mk to bootstrap local dependencies by
+using the command `make new-app` or `make new-lib`. This
+command will create the necessary directories and bootstrap
+the application.
+
+For example, to create a full fledged OTP application as
+a local dependency:
+
+[source,bash]
+$ make new-app in=webchat
+
+Or, the same as an OTP library:
+
+[source,bash]
+$ make new-lib in=webchat
+
+Templates also work with local dependencies, from the root
+directory of the project. You do need however to tell
+Erlang.mk to create the files in the correct application:
+
+[source,bash]
+$ make new t=gen_server n=my_server in=webchat
+
+=== Repositories with no application at the root level
+
+It's possible to use Erlang.mk with only applications in
+'$(APPS_DIR)', and nothing at the root of the repository.
+Just create a folder, put the 'erlang.mk' file in it,
+write a Makefile that includes it, and start creating
+your applications.
+
+Similarly, it's possible to have a repository with only
+dependencies found in '$(DEPS_DIR)'. You just need to
+create a Makefile and specify the dependencies you want.
+This allows you to create a repository for handling the
+building of releases, for example.
+
+=== Autopatch
+
+Erlang.mk will automatically patch all the dependencies it
+fetches. It needs to do this to ensure that the dependencies
+become compatible with not only Erlang.mk, but also with
+the version of Erlang.mk that is currently used.
+
+When fetching a dependency, the following operations are
+performed:
+
+* Fetch the dependency using the configured fetch method
+* If it contains a 'configure.ac' or 'configure.in' file, run `autoreconf -Wall -vif -I m4`
+* If it contains a 'configure' script, run it
+* Run autopatch on the project
+
+Autopatch first checks if there is any project-specific patch
+enabled. There are currently two: `RABBITMQ_CLIENT_PATCH` for
+the `amqp_client` dependency, and `RABBITMQ_SERVER_PATCH` for
+the `rabbit` dependency. These are needed only for RabbitMQ
+versions before 3.6.0 (assuming you are using upstream RabbitMQ,
+and not a fork).
+
+Otherwise, autopatch performs different operations depending
+on the kind of project it finds the dependency to be.
+
+* Rebar projects are automatically converted to use Erlang.mk
+as their build tool. This essentially patches Rebar out, and
+fixes and converts the project to be compatible with Erlang.mk.
+
+* Erlang.mk projects have their 'erlang.mk' file redirect to
+the top-level project's Erlang.mk. This is to ensure that
+functionality works across all dependencies, even if the
+dependency's Erlang.mk is outdated.
+
+* Other Erlang projects get a small Erlang.mk Makefile
+generated automatically.
+
+* Projects with no source directory and no Makefile get an
+empty Makefile generated, for compatibility purposes.
+
+* Other projects with no Makefile are left untouched.
+
+You can disable the replacing of the 'erlang.mk' file by
+defining the `NO_AUTOPATCH_ERLANG_MK` variable:
+
+[source,make]
+NO_AUTOPATCH_ERLANG_MK = 1
+
+You can also disable autopatch entirely for a few select
+projects using the `NO_AUTOPATCH` variable:
+
+[source,make]
+NO_AUTOPATCH = cowboy ranch cowlib
+
+=== Skipping deps
+
+It is possible to temporarily skip all dependency operations.
+This is done by defining the `SKIP_DEPS` variable. Use cases
+include being somewhere with no connection to download them,
+or perhaps a peculiar setup.
+
+A typical usage would be:
+
+[source,bash]
+$ make SKIP_DEPS=1
+
+When the variable is defined:
+
+* Dependencies will not be compiled or downloaded when required
+* The dependency directory '$(DEPS_DIR)' will not be removed on `make distclean`
+
+This variable only applies to remote dependencies.
diff --git a/docs/en/erlang.mk/1/guide/deps/index.html b/docs/en/erlang.mk/1/guide/deps/index.html
new file mode 100644
index 00000000..ad4a3523
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/deps/index.html
@@ -0,0 +1,768 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Packages and dependencies</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Packages and dependencies</span></h1>
+
+<div class="paragraph"><p>Erlang.mk can fetch and compile the dependencies that your
+project requires. Erlang.mk improves upon the concepts
+introduced by Rebar, so they should be familiar to many
+seasoned Erlang developers.</p></div>
+<div class="paragraph"><p>Erlang.mk is not a package manager, nor is it trying to be,
+but it does include an index of Erlang packages to make
+discovering useful projects easier.</p></div>
+<div class="paragraph"><p>This chapter will explain how to use packages, add
+dependencies to your project or bundle them directly
+in a single repository.</p></div>
+<div class="sect1">
+<h2 id="_searching_packages">Searching packages</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk gives you access to nearly 500 packages, with more
+being added regularly.</p></div>
+<div class="paragraph"><p>To find a package, search for it:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make search <span style="color: #009900">q</span><span style="color: #990000">=</span>pool</tt></pre></div></div>
+<div class="paragraph"><p>This will return all packages matching this word, like worker
+pool and acceptor pool projects.</p></div>
+<div class="paragraph"><p>You can also list everything and use regular command line
+tools to find what you need, for example:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make search <span style="color: #990000">|</span> less</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_adding_dependencies_to_your_project">Adding dependencies to your project</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Once you find the package you need, adding it as a dependency
+to your project is a one-liner:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy</tt></pre></div></div>
+<div class="paragraph"><p>And that&#8217;s it! The next time you run <code>make</code>, Erlang.mk will
+fetch and compile Cowboy. Erlang.mk will also ensure Cowboy
+is available whenever you use the shell, run tests and any
+other operations.</p></div>
+<div class="paragraph"><p>Erlang.mk will fill in the application resource file with
+all applications found in <code>DEPS</code>. But not all dependencies
+are Erlang applications, and not all dependencies need to
+be a runtime dependency. That&#8217;s where the <code>BUILD_DEPS</code>
+variable comes in: it works just like <code>DEPS</code>, except the
+dependencies listed there will not be added as runtime
+dependencies.</p></div>
+<div class="paragraph"><p>For example, you could add a parse transform project like
+this to make it available only at build time:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">BUILD_DEPS =</span> erlando</tt></pre></div></div>
+<div class="paragraph"><p>Or you could depend on a C project directly, if you are
+building a NIF:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">BUILD_DEPS =</span> leveldb
+<span style="color: #009900">dep_leveldb =</span> git https<span style="color: #990000">:</span>//github.com/basho/leveldb 2.1.3</tt></pre></div></div>
+<div class="paragraph"><p>This dependency will be built before your application, so
+you could easily copy the resulting shared file into your
+<em>priv/</em> directory as part of the build process. More information
+about that in the <a href="../ports">NIFs and port drivers</a>
+chapter.</p></div>
+<div class="paragraph"><p>Another variable, <code>LOCAL_DEPS</code>, allows specifying runtime
+dependencies which are part of Erlang/OTP itself, but also
+dependencies that are included in the repository. Since they
+are already on your system, there is no need to fetch them.
+Do note that there is no way to choose the version, the
+application used will be the one already on your system.</p></div>
+<div class="paragraph"><p>You could depend on the Crypto application, for example:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">LOCAL_DEPS =</span> crypto</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk comes with additional types of dependencies.
+It has <code>TEST_DEPS</code> for dependencies used only for testing:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">TEST_DEPS =</span> ct_helper
+<span style="color: #009900">dep_ct_helper =</span> git https<span style="color: #990000">:</span>//github.com/ninenines/ct_helper master</tt></pre></div></div>
+<div class="paragraph"><p><code>DOC_DEPS</code> for dependencies used only when building documentation:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DOC_DEPS =</span> edown</tt></pre></div></div>
+<div class="paragraph"><p><code>REL_DEPS</code> for dependencies required to build the release,
+or to include extra applications in the release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">REL_DEPS =</span> recon</tt></pre></div></div>
+<div class="paragraph"><p>And <code>SHELL_DEPS</code> for dependencies to make available when running
+the <code>make shell</code> command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SHELL_DEPS =</span> tddreloader</tt></pre></div></div>
+<div class="paragraph"><p>All these will be documented in more details in their respective
+chapters.</p></div>
+<div class="sect3">
+<h4 id="_modifying_the_dependency_source_or_version">Modifying the dependency source or version</h4>
+<div class="paragraph"><p>By default, Erlang.mk will look into its package index to
+find the project you are looking for, if you only provide
+its name. This is this case:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy</tt></pre></div></div>
+<div class="paragraph"><p>If you need a different version, you need to define another
+variable. There are two ways to do this, each being useful
+for different reasons.</p></div>
+<div class="paragraph"><p>If you simply want to change the commit number, all you
+need to do is to define the <code>dep_$(DEP_NAME)_commit</code>
+variable. In the case of Cowboy, this would look like this:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">dep_cowboy_commit =</span> 2.0.0-pre.2</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk will use the package index to get all information
+about Cowboy, except the commit number which will be overriden.</p></div>
+<div class="paragraph"><p>If you need to set the fetch method or repository information
+too, for example because you want to use your own fork, or
+simply because the project is missing from the index, you
+can define the <code>dep_$(DEP_NAME)</code> variable with everything:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">dep_cowboy =</span> git https<span style="color: #990000">:</span>//github.com/essen/cowboy 2.0.0-pre.2</tt></pre></div></div>
+<div class="paragraph"><p>This will fetch Cowboy from your fork at the given commit.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_fetch_methods">Fetch methods</h4>
+<div class="paragraph"><p>Erlang.mk comes with a number of different fetch methods.
+You can fetch from Git, Mercurial, SVN, to name a few.
+There are fetch methods that will work everywhere, and
+fetch methods that will only work in a given environment.</p></div>
+<div class="paragraph"><p>The following table lists all existing methods:</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Name </th>
+<th align="center" valign="top"> Format </th>
+<th align="center" valign="top"> Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">git</p></td>
+<td align="center" valign="top"><p class="table">git repo commit</p></td>
+<td align="center" valign="top"><p class="table">Clone the Git repository and checkout the given version</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">git-submodule</p></td>
+<td align="center" valign="top"><p class="table">git-submodule</p></td>
+<td align="center" valign="top"><p class="table">Initialize and update the Git submodule</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">hg</p></td>
+<td align="center" valign="top"><p class="table">hg repo commit</p></td>
+<td align="center" valign="top"><p class="table">Clone the Mercurial repository and update to the given version</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">svn</p></td>
+<td align="center" valign="top"><p class="table">svn repo</p></td>
+<td align="center" valign="top"><p class="table">Checkout the given SVN repository</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">cp</p></td>
+<td align="center" valign="top"><p class="table">cp path/to/repo</p></td>
+<td align="center" valign="top"><p class="table">Recursively copy a local directory</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">hex</p></td>
+<td align="center" valign="top"><p class="table">hex version</p></td>
+<td align="center" valign="top"><p class="table">Download the given project version from hex.pm</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">fail</p></td>
+<td align="center" valign="top"><p class="table">N/A</p></td>
+<td align="center" valign="top"><p class="table">Always fail, reserved for internal use</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">legacy</p></td>
+<td align="center" valign="top"><p class="table">N/A</p></td>
+<td align="center" valign="top"><p class="table">Legacy Erlang.mk fetcher, reserved for internal use</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="paragraph"><p>The <code>git</code> and <code>hg</code> methods both have a repository and commit.
+You can use any valid commit, tag or branch in that repository
+for the commit value.</p></div>
+<div class="paragraph"><p>For example, to fetch Cowboy with tag 2.0.0-pre.2 from Git:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_cowboy =</span> git https<span style="color: #990000">:</span>//github.com/ninenines/cowboy 2.0.0-pre.2</tt></pre></div></div>
+<div class="paragraph"><p>Or to fetch Ehsa tag 4.0.3 from Mercurial:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_ehsa =</span> hg https<span style="color: #990000">:</span>//bitbucket.org/a12n/ehsa 4.0.3</tt></pre></div></div>
+<div class="paragraph"><p>Git also comes with a concept of submodules. Erlang.mk can
+automatically initializes and updates submodules for dependencies,
+as long as they were added beforehand using <code>git submodule add</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_cowboy =</span> git-submodule</tt></pre></div></div>
+<div class="paragraph"><p>The <code>svn</code> method only has a repository value, but that&#8217;s
+simply because the SVN repository URL can also contain
+the path and commit.</p></div>
+<div class="paragraph"><p>This would fetch an example project from the trunk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_ex1 =</span> svn https<span style="color: #990000">:</span>//example.com/svn/trunk/project/ex<span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>And this would fetch a separate example project from a
+specific commit:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_ex2 =</span> svn svn<span style="color: #990000">:</span>//example.com/svn/branches/erlang-proj/ex<span style="color: #993399">2</span>@<span style="color: #993399">264</span></tt></pre></div></div>
+<div class="paragraph"><p>You can copy a directory from your machine using the <code>cp</code> method.
+It only takes the path to copy from:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_cowboy =</span> cp <span style="color: #009900">$(HOME)</span>/ninenines/cowboy</tt></pre></div></div>
+<div class="paragraph"><p>Finally, you can use a package from the
+<a href="https://hex.pm/">Hex repository</a>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">dep_cowboy =</span> hex 1.0.3</tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_custom_fetch_methods">Custom fetch methods</h4>
+<div class="paragraph"><p>If none of the existing methods fit your use, you can simply
+define your own. Erlang.mk will consider all variables that
+are named as <code>dep_fetch_$(METHOD)</code> to be available fetch
+methods. You can do anything inside this variable, as long
+as you create a folder named <em>$(DEPS_DIR)/$(call dep_name,$1)</em>.
+Or in layman terms, if your dependency is Cowboy, this would
+become <em>deps/cowboy</em>.</p></div>
+<div class="paragraph"><p>To give an example, this is what the Git method does:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>define dep_fetch_git
+ git clone -q -n -- <span style="color: #009900">$(</span>call dep_repo<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">)</span> <span style="color: #009900">$(DEPS_DIR)</span><span style="color: #990000">/</span><span style="color: #009900">$(</span>call dep_name<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">);</span> <span style="color: #990000">\</span>
+ cd <span style="color: #009900">$(DEPS_DIR)</span><span style="color: #990000">/</span><span style="color: #009900">$(</span>call dep_name<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">)</span> <span style="color: #990000">&amp;&amp;</span> git checkout -q <span style="color: #009900">$(</span>call dep_commit<span style="color: #990000">,</span><span style="color: #009900">$1</span><span style="color: #990000">);</span>
+endef</tt></pre></div></div>
+<div class="paragraph"><p>Note that, like dependency information, this custom fetch method
+must be written before including <em>erlang.mk</em>.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_how_deps_are_fetched_and_built">How deps are fetched and built</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The order in which dependencies are fetched and built is well
+defined. This means that Erlang.mk will get the same applications
+regardless of the command or options being used.</p></div>
+<div class="paragraph"><p>In tree traversal terms, where the list of dependencies is a
+tree, Erlang.mk fetches everything using the pre-order traversal
+method. The steps can be summarized like this, starting from
+the root application:</p></div>
+<div class="olist arabic"><ol class="arabic">
+<li>
+<p>
+Fetch all dependencies for the application
+</p>
+</li>
+<li>
+<p>
+Build first dependency
+</p>
+</li>
+<li>
+<p>
+Build Nth dependency
+</p>
+</li>
+<li>
+<p>
+Build last dependency
+</p>
+</li>
+</ol></div>
+<div class="paragraph"><p>Every time a dependency is built, these same steps are followed,
+recursively.</p></div>
+<div class="paragraph"><p>Do note that the first step, fetching all dependencies of
+an application, is not guaranteed to be ordered. The reason
+for this is that it is not possible to have the same dependency
+listed twice in a single application, and therefore there can
+be no conflicts. Remember, this step only fetches, at no point
+are different applications built in parallel.</p></div>
+<div class="paragraph"><p>What about conflicts between the dependencies of different
+applications? Simple. Since builds are ordered, this means
+that the first version of an application that is fetched
+will be the one that wins.</p></div>
+<div class="paragraph"><p>This means that if project A depends on projects B and C,
+in this order, and that both B and C depend on a different
+version of D, it will always be B&#8217;s version of D that wins,
+because we fetch the dependencies of B before fetching
+those from C.</p></div>
+<div class="paragraph"><p>Similarly, if project A depends on projects B, C and D,
+regardless of the order, and A, B and C depend on a
+different version of D, it will always be A&#8217;s version
+that wins, because we fetch all dependencies of A before
+fetching those from B or C.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_ignoring_unwanted_dependencies">Ignoring unwanted dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Sometimes, you may want to ignore dependencies entirely.
+Not even fetch them. You may want to do this because a
+project you depend on depends on an application you do
+not need (like a dependency for building documentation
+or testing). Or maybe the dependency is already installed
+on your system.</p></div>
+<div class="paragraph"><p>To ignore a dependency, simply add it to the <code>IGNORE_DEPS</code>
+variable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>IGNORE_DEPS <span style="color: #990000">+=</span> edown proper</tt></pre></div></div>
+<div class="paragraph"><p>This will only ignore dependencies that are needed for
+building. It is therefore safe to write:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>IGNORE_DEPS <span style="color: #990000">+=</span> edown proper
+<span style="color: #009900">TEST_DEPS =</span> proper</tt></pre></div></div>
+<div class="paragraph"><p>The PropEr application will be fetched as intended when
+running <code>make tests</code> or <code>make check</code>. It will however
+not be fetched when running <code>make</code> or <code>make deps</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependencies_directory">Dependencies directory</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Dependencies are fetched in <em>$(DEPS_DIR)</em>. By default this is
+the <em>deps</em> directory. You can change this default, but you
+should only do so if it was not defined previously. Erlang.mk
+uses this variable to tell dependencies where to fetch their
+own dependencies.</p></div>
+<div class="paragraph"><p>You will therefore need to use <code>?=</code> instead of <code>=</code>. Of course,
+if you know you will never use this project as a dependency,
+<code>=</code> will work. But to avoid it biting you later on, do this:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>DEPS_DIR <span style="color: #990000">?=</span> <span style="color: #009900">$(CURDIR)</span>/libs</tt></pre></div></div>
+<div class="paragraph"><p>The <code>$(CURDIR)</code> part is important, otherwise dependencies of
+dependencies will be fetched in the wrong directory.</p></div>
+<div class="paragraph"><p>Erlang.mk will also export the <code>REBAR_DEPS_DIR</code> variable for
+compatibility with Rebar build tools, as long as they are
+recent enough.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_many_applications_in_one_repository">Many applications in one repository</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In addition to the dependencies that are fetched, Erlang.mk
+also allows you to have dependencies local to your repository.
+This kind of layout is sometimes called multi-application
+repositories, or repositories with multiple applications.</p></div>
+<div class="paragraph"><p>They work exactly the same as remote dependencies, except:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+They are not fetched
+</p>
+</li>
+<li>
+<p>
+They are not autopatched
+</p>
+</li>
+<li>
+<p>
+They are not deleted on <code>make distclean</code>
+</p>
+</li>
+<li>
+<p>
+They are not automatically added to the application resource file
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>To properly fill the application resource file, you will
+need to define the <code>LOCAL_DEPS</code> variable for each relevant
+application, the same as for OTP applications.</p></div>
+<div class="paragraph"><p>If there is a conflict between a local dependency and a
+remote dependency, then the local dependency always wins;
+an error will be triggered when trying to fetch the
+conflicting remote dependency.</p></div>
+<div class="paragraph"><p>To start using dependencies local to the repository, simply
+create a folder named <em>$(APPS_DIR)</em>. By default, this folder
+is the <em>apps/</em> directory.</p></div>
+<div class="paragraph"><p>You can use Erlang.mk to bootstrap local dependencies by
+using the command <code>make new-app</code> or <code>make new-lib</code>. This
+command will create the necessary directories and bootstrap
+the application.</p></div>
+<div class="paragraph"><p>For example, to create a full fledged OTP application as
+a local dependency:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make new-app <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
+<div class="paragraph"><p>Or, the same as an OTP library:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make new-lib <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
+<div class="paragraph"><p>Templates also work with local dependencies, from the root
+directory of the project. You do need however to tell
+Erlang.mk to create the files in the correct application:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make new <span style="color: #009900">t</span><span style="color: #990000">=</span>gen_server <span style="color: #009900">n</span><span style="color: #990000">=</span>my_server <span style="font-weight: bold"><span style="color: #0000FF">in</span></span><span style="color: #990000">=</span>webchat</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_repositories_with_no_application_at_the_root_level">Repositories with no application at the root level</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It&#8217;s possible to use Erlang.mk with only applications in
+<em>$(APPS_DIR)</em>, and nothing at the root of the repository.
+Just create a folder, put the <em>erlang.mk</em> file in it,
+write a Makefile that includes it, and start creating
+your applications.</p></div>
+<div class="paragraph"><p>Similarly, it&#8217;s possible to have a repository with only
+dependencies found in <em>$(DEPS_DIR)</em>. You just need to
+create a Makefile and specify the dependencies you want.
+This allows you to create a repository for handling the
+building of releases, for example.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_autopatch">Autopatch</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk will automatically patch all the dependencies it
+fetches. It needs to do this to ensure that the dependencies
+become compatible with not only Erlang.mk, but also with
+the version of Erlang.mk that is currently used.</p></div>
+<div class="paragraph"><p>When fetching a dependency, the following operations are
+performed:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Fetch the dependency using the configured fetch method
+</p>
+</li>
+<li>
+<p>
+If it contains a <em>configure.ac</em> or <em>configure.in</em> file, run <code>autoreconf -Wall -vif -I m4</code>
+</p>
+</li>
+<li>
+<p>
+If it contains a <em>configure</em> script, run it
+</p>
+</li>
+<li>
+<p>
+Run autopatch on the project
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Autopatch first checks if there is any project-specific patch
+enabled. There are currently two: <code>RABBITMQ_CLIENT_PATCH</code> for
+the <code>amqp_client</code> dependency, and <code>RABBITMQ_SERVER_PATCH</code> for
+the <code>rabbit</code> dependency. These are needed only for RabbitMQ
+versions before 3.6.0 (assuming you are using upstream RabbitMQ,
+and not a fork).</p></div>
+<div class="paragraph"><p>Otherwise, autopatch performs different operations depending
+on the kind of project it finds the dependency to be.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Rebar projects are automatically converted to use Erlang.mk
+as their build tool. This essentially patches Rebar out, and
+fixes and converts the project to be compatible with Erlang.mk.
+</p>
+</li>
+<li>
+<p>
+Erlang.mk projects have their <em>erlang.mk</em> file redirect to
+the top-level project&#8217;s Erlang.mk. This is to ensure that
+functionality works across all dependencies, even if the
+dependency&#8217;s Erlang.mk is outdated.
+</p>
+</li>
+<li>
+<p>
+Other Erlang projects get a small Erlang.mk Makefile
+generated automatically.
+</p>
+</li>
+<li>
+<p>
+Projects with no source directory and no Makefile get an
+empty Makefile generated, for compatibility purposes.
+</p>
+</li>
+<li>
+<p>
+Other projects with no Makefile are left untouched.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>You can disable the replacing of the <em>erlang.mk</em> file by
+defining the <code>NO_AUTOPATCH_ERLANG_MK</code> variable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">NO_AUTOPATCH_ERLANG_MK =</span> <span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also disable autopatch entirely for a few select
+projects using the <code>NO_AUTOPATCH</code> variable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">NO_AUTOPATCH =</span> cowboy ranch cowlib</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_skipping_deps">Skipping deps</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It is possible to temporarily skip all dependency operations.
+This is done by defining the <code>SKIP_DEPS</code> variable. Use cases
+include being somewhere with no connection to download them,
+or perhaps a peculiar setup.</p></div>
+<div class="paragraph"><p>A typical usage would be:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make <span style="color: #009900">SKIP_DEPS</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>When the variable is defined:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Dependencies will not be compiled or downloaded when required
+</p>
+</li>
+<li>
+<p>
+The dependency directory <em>$(DEPS_DIR)</em> will not be removed on <code>make distclean</code>
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This variable only applies to remote dependencies.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/dialyzer.asciidoc b/docs/en/erlang.mk/1/guide/dialyzer.asciidoc
new file mode 100644
index 00000000..58fe53ff
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/dialyzer.asciidoc
@@ -0,0 +1,73 @@
+[[dialyzer]]
+== Dialyzer
+
+Dialyzer is a tool that will detect discrepancies in your
+program. It does so using a technique known as success
+typing analysis which has the advantage of providing no
+false positives. Dialyzer is able to detect type errors,
+dead code and more.
+
+Erlang.mk provides a wrapper around Dialyzer.
+
+=== How it works
+
+Dialyzer requires a PLT file to work. The PLT file contains
+the analysis information from all applications which are not
+expected to change, or rarely do. These would be all the
+dependencies of the application or applications you are
+currently working on, including standard applications in
+Erlang/OTP itself.
+
+Dialyzer can generate this PLT file. Erlang.mk includes rules
+to automatically generate the PLT file when it is missing.
+
+Once the PLT file is generated, Dialyzer can perform the
+analysis in record time.
+
+=== Configuration
+
+In a typical usage scenario, no variable needs to be set.
+The defaults should be enough. Do note however that the
+dependencies need to be set properly using the `DEPS` and
+`LOCAL_DEPS` variables.
+
+The `DIALYZER_PLT` file indicates where the PLT file will
+be written to (and read from). By default this is
+'$(PROJECT).plt' in the project's directory. Note that
+the `DIALYZER_PLT` variable is exported and is understood
+by Dialyzer directly.
+
+The `PLT_APPS` variable can be used to add additional
+applications to the PLT. You can either list application
+names or paths to these applications.
+
+Erlang.mk defines two variables for specifying options
+for the analysis: `DIALYZER_DIRS` and `DIALYZER_OPTS`.
+The former one defines which directories should be part
+of the analysis. The latter defines what extra warnings
+Dialyzer should report.
+
+Note that Erlang.mk enables the race condition warnings
+by default. As it can take considerably large resources
+to run, you may want to disable it on larger projects.
+
+=== Usage
+
+To perform an analysis, run the following command:
+
+[source,bash]
+$ make dialyze
+
+This will create the PLT file if it doesn't exist.
+
+The analysis will also be performed when you run the
+following command, alongside tests:
+
+[source,bash]
+$ make check
+
+You can use the `plt` target to create the PLT file if
+it doesn't exist. This is normally not necessary as
+Dialyzer creates it automatically.
+
+The PLT file will be removed when you run `make distclean`.
diff --git a/docs/en/erlang.mk/1/guide/dialyzer/index.html b/docs/en/erlang.mk/1/guide/dialyzer/index.html
new file mode 100644
index 00000000..8846ff60
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/dialyzer/index.html
@@ -0,0 +1,207 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Dialyzer</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Dialyzer</span></h1>
+
+<div class="paragraph"><p>Dialyzer is a tool that will detect discrepancies in your
+program. It does so using a technique known as success
+typing analysis which has the advantage of providing no
+false positives. Dialyzer is able to detect type errors,
+dead code and more.</p></div>
+<div class="paragraph"><p>Erlang.mk provides a wrapper around Dialyzer.</p></div>
+<div class="sect1">
+<h2 id="_how_it_works">How it works</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Dialyzer requires a PLT file to work. The PLT file contains
+the analysis information from all applications which are not
+expected to change, or rarely do. These would be all the
+dependencies of the application or applications you are
+currently working on, including standard applications in
+Erlang/OTP itself.</p></div>
+<div class="paragraph"><p>Dialyzer can generate this PLT file. Erlang.mk includes rules
+to automatically generate the PLT file when it is missing.</p></div>
+<div class="paragraph"><p>Once the PLT file is generated, Dialyzer can perform the
+analysis in record time.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In a typical usage scenario, no variable needs to be set.
+The defaults should be enough. Do note however that the
+dependencies need to be set properly using the <code>DEPS</code> and
+<code>LOCAL_DEPS</code> variables.</p></div>
+<div class="paragraph"><p>The <code>DIALYZER_PLT</code> file indicates where the PLT file will
+be written to (and read from). By default this is
+<em>$(PROJECT).plt</em> in the project&#8217;s directory. Note that
+the <code>DIALYZER_PLT</code> variable is exported and is understood
+by Dialyzer directly.</p></div>
+<div class="paragraph"><p>The <code>PLT_APPS</code> variable can be used to add additional
+applications to the PLT. You can either list application
+names or paths to these applications.</p></div>
+<div class="paragraph"><p>Erlang.mk defines two variables for specifying options
+for the analysis: <code>DIALYZER_DIRS</code> and <code>DIALYZER_OPTS</code>.
+The former one defines which directories should be part
+of the analysis. The latter defines what extra warnings
+Dialyzer should report.</p></div>
+<div class="paragraph"><p>Note that Erlang.mk enables the race condition warnings
+by default. As it can take considerably large resources
+to run, you may want to disable it on larger projects.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To perform an analysis, run the following command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make dialyze</tt></pre></div></div>
+<div class="paragraph"><p>This will create the PLT file if it doesn&#8217;t exist.</p></div>
+<div class="paragraph"><p>The analysis will also be performed when you run the
+following command, alongside tests:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make check</tt></pre></div></div>
+<div class="paragraph"><p>You can use the <code>plt</code> target to create the PLT file if
+it doesn&#8217;t exist. This is normally not necessary as
+Dialyzer creates it automatically.</p></div>
+<div class="paragraph"><p>The PLT file will be removed when you run <code>make distclean</code>.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/edoc.asciidoc b/docs/en/erlang.mk/1/guide/edoc.asciidoc
new file mode 100644
index 00000000..9fc1a740
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/edoc.asciidoc
@@ -0,0 +1,48 @@
+[[edoc]]
+== EDoc comments
+
+Erlang.mk provides a thin wrapper on top of EDoc, an application
+that generates documentation based on comments found in modules.
+
+=== Writing EDoc comments
+
+The http://www.erlang.org/doc/apps/edoc/chapter.html[EDoc user guide]
+explains everything you need to know about EDoc comments.
+
+=== Configuration
+
+The `EDOC_OPTS` variable allows you to specify additional
+EDoc options. Options are documented in the
+http://www.erlang.org/doc/man/edoc.html#run-2[EDoc manual].
+
+A common use for this variable is to enable Markdown in doc
+comments, using the `edown` application:
+
+[source,make]
+DOC_DEPS = edown
+EDOC_OPTS = {doclet, edown_doclet}
+
+=== Usage
+
+To build all documentation, you would typically use:
+
+[source,bash]
+$ make docs
+
+Do note, however, that EDoc comments will only be generated
+automatically if the 'doc/overview.edoc' file exists. If you
+do not want that file and still want to generate doc comments,
+two solutions are available.
+
+You can generate EDoc documentation directly:
+
+[source,bash]
+$ make edoc
+
+You can enable automatic generation on `make docs` by adding
+the following to your Makefile:
+
+[source,make]
+----
+docs:: edoc
+----
diff --git a/docs/en/erlang.mk/1/guide/edoc/index.html b/docs/en/erlang.mk/1/guide/edoc/index.html
new file mode 100644
index 00000000..97ab6018
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/edoc/index.html
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: EDoc comments</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>EDoc comments</span></h1>
+
+<div class="paragraph"><p>Erlang.mk provides a thin wrapper on top of EDoc, an application
+that generates documentation based on comments found in modules.</p></div>
+<div class="sect1">
+<h2 id="_writing_edoc_comments">Writing EDoc comments</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/edoc/chapter.html">EDoc user guide</a>
+explains everything you need to know about EDoc comments.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>EDOC_OPTS</code> variable allows you to specify additional
+EDoc options. Options are documented in the
+<a href="http://www.erlang.org/doc/man/edoc.html#run-2">EDoc manual</a>.</p></div>
+<div class="paragraph"><p>A common use for this variable is to enable Markdown in doc
+comments, using the <code>edown</code> application:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DOC_DEPS =</span> edown
+<span style="color: #009900">EDOC_OPTS =</span> {doclet<span style="color: #990000">,</span> edown_doclet}</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To build all documentation, you would typically use:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make docs</tt></pre></div></div>
+<div class="paragraph"><p>Do note, however, that EDoc comments will only be generated
+automatically if the <em>doc/overview.edoc</em> file exists. If you
+do not want that file and still want to generate doc comments,
+two solutions are available.</p></div>
+<div class="paragraph"><p>You can generate EDoc documentation directly:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make edoc</tt></pre></div></div>
+<div class="paragraph"><p>You can enable automatic generation on <code>make docs</code> by adding
+the following to your Makefile:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #990000">docs::</span> edoc</tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/escripts.asciidoc b/docs/en/erlang.mk/1/guide/escripts.asciidoc
new file mode 100644
index 00000000..3d68c77b
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/escripts.asciidoc
@@ -0,0 +1,6 @@
+[[escript]]
+== Escripts
+
+// @todo Write it.
+
+Placeholder chapter.
diff --git a/docs/en/erlang.mk/1/guide/escripts/index.html b/docs/en/erlang.mk/1/guide/escripts/index.html
new file mode 100644
index 00000000..155ae1d3
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/escripts/index.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Escripts</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Escripts</span></h1>
+
+<div class="paragraph"><p>Placeholder chapter.</p></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/eunit.asciidoc b/docs/en/erlang.mk/1/guide/eunit.asciidoc
new file mode 100644
index 00000000..496b6749
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/eunit.asciidoc
@@ -0,0 +1,122 @@
+[[eunit]]
+== EUnit
+
+EUnit is the tool of choice for unit testing. Erlang.mk
+automates a few things on top of EUnit, including the
+discovery and running of unit tests.
+
+=== Writing tests
+
+The http://www.erlang.org/doc/apps/eunit/chapter.html[EUnit user guide]
+is the best place to learn how to write tests. Of note is
+that all functions ending with `_test` or `_test_` will be
+picked up as EUnit test cases.
+
+Erlang.mk will automatically pick up tests found in any of
+the Erlang modules of your application. It will also pick up
+tests located in the '$(TEST_DIR)' directory, which defaults
+to 'test/'.
+
+It is generally a good practice to hide test code from
+the code you ship to production. With Erlang.mk, you can
+do this thanks to the `TEST` macro. It is only defined
+when running tests:
+
+[source,erlang]
+----
+-ifdef(TEST).
+
+%% Insert tests here.
+
+-endif.
+----
+
+Be careful, however, if you include the EUnit header file,
+as it also defines the `TEST` macro. Make sure to only include
+it inside an `ifdef` block, otherwise tests will always be
+compiled.
+
+[source,erlang]
+----
+-ifdef(TEST).
+
+-include_lib(\"eunit/include/eunit.hrl\").
+
+%% Insert tests here.
+
+-endif.
+----
+
+Erlang.mk will automatically recompile your code when you
+perform a normal build after running tests, and vice versa.
+
+=== Configuration
+
+The `EUNIT_OPTS` variable allows you to specify additional
+EUnit options. Options are documented in the
+http://www.erlang.org/doc/man/eunit.html#test-2[EUnit manual].
+At the time of writing, the only available option is `verbose`:
+
+[source,make]
+EUNIT_OPTS = verbose
+
+The `EUNIT_ERL_OPTS` variable allows you to specify options
+to be passed to `erl` when running EUnit tests. For example,
+you can load the 'vm.args' and 'sys.config' files:
+
+[source,make]
+EUNIT_ERL_OPTS = -args_file rel/vm.args -config rel/sys.config
+
+=== Usage
+
+To run all tests (including EUnit):
+
+[source,bash]
+$ make tests
+
+To run all tests and static checks (including EUnit):
+
+[source,bash]
+$ make check
+
+You can also run EUnit separately:
+
+[source,bash]
+$ make eunit
+
+EUnit will be quiet by default, only outputting errors.
+You can easily make it verbose for a single invocation:
+
+[source,bash]
+$ make eunit EUNIT_OPTS=verbose
+
+Erlang.mk allows you to run all tests from a specific
+module, or a specific test case from that module, using
+the variable `t`.
+
+For example, to run all tests from the `cow_http_hd`
+module (instead of all tests from the entire project),
+one could write:
+
+[source,bash]
+$ make eunit t=cow_http_hd
+
+Similarly, to run a specific test case:
+
+[source,bash]
+$ make eunit t=cow_http_hd:parse_accept_test_
+
+To do the same against a multi-application repository,
+you can use the `-C` option:
+
+[source,bash]
+$ make -C apps/my_app eunit t=my_module:hello_test
+
+Note that this also applies to dependencies. From Cowboy,
+you can run the following directly:
+
+[source,bash]
+$ make -C deps/cowlib eunit t=cow_http_hd
+
+Finally, xref:coverage[code coverage] is available,
+but covered in its own chapter.
diff --git a/docs/en/erlang.mk/1/guide/eunit/index.html b/docs/en/erlang.mk/1/guide/eunit/index.html
new file mode 100644
index 00000000..b4d2ca59
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/eunit/index.html
@@ -0,0 +1,279 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: EUnit</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>EUnit</span></h1>
+
+<div class="paragraph"><p>EUnit is the tool of choice for unit testing. Erlang.mk
+automates a few things on top of EUnit, including the
+discovery and running of unit tests.</p></div>
+<div class="sect1">
+<h2 id="_writing_tests">Writing tests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <a href="http://www.erlang.org/doc/apps/eunit/chapter.html">EUnit user guide</a>
+is the best place to learn how to write tests. Of note is
+that all functions ending with <code>_test</code> or <code>_test_</code> will be
+picked up as EUnit test cases.</p></div>
+<div class="paragraph"><p>Erlang.mk will automatically pick up tests found in any of
+the Erlang modules of your application. It will also pick up
+tests located in the <em>$(TEST_DIR)</em> directory, which defaults
+to <em>test/</em>.</p></div>
+<div class="paragraph"><p>It is generally a good practice to hide test code from
+the code you ship to production. With Erlang.mk, you can
+do this thanks to the <code>TEST</code> macro. It is only defined
+when running tests:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">-ifdef</span></span>(<span style="color: #009900">TEST</span>)<span style="color: #990000">.</span>
+
+<span style="font-style: italic"><span style="color: #9A1900">%% Insert tests here.</span></span>
+
+<span style="font-weight: bold"><span style="color: #000080">-endif</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Be careful, however, if you include the EUnit header file,
+as it also defines the <code>TEST</code> macro. Make sure to only include
+it inside an <code>ifdef</code> block, otherwise tests will always be
+compiled.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">-ifdef</span></span>(<span style="color: #009900">TEST</span>)<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000080">-include_lib</span></span>(<span style="color: #990000">\</span><span style="color: #FF0000">"eunit/include/eunit.hrl\").</span>
+
+<span style="color: #FF0000">%% Insert tests here.</span>
+
+<span style="color: #FF0000">-endif.</span></tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk will automatically recompile your code when you
+perform a normal build after running tests, and vice versa.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>EUNIT_OPTS</code> variable allows you to specify additional
+EUnit options. Options are documented in the
+<a href="http://www.erlang.org/doc/man/eunit.html#test-2">EUnit manual</a>.
+At the time of writing, the only available option is <code>verbose</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">EUNIT_OPTS =</span> verbose</tt></pre></div></div>
+<div class="paragraph"><p>The <code>EUNIT_ERL_OPTS</code> variable allows you to specify options
+to be passed to <code>erl</code> when running EUnit tests. For example,
+you can load the <em>vm.args</em> and <em>sys.config</em> files:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">EUNIT_ERL_OPTS =</span> -args_file rel/vm.args -config rel/sys.config</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To run all tests (including EUnit):</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make tests</tt></pre></div></div>
+<div class="paragraph"><p>To run all tests and static checks (including EUnit):</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make check</tt></pre></div></div>
+<div class="paragraph"><p>You can also run EUnit separately:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make eunit</tt></pre></div></div>
+<div class="paragraph"><p>EUnit will be quiet by default, only outputting errors.
+You can easily make it verbose for a single invocation:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make eunit <span style="color: #009900">EUNIT_OPTS</span><span style="color: #990000">=</span>verbose</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk allows you to run all tests from a specific
+module, or a specific test case from that module, using
+the variable <code>t</code>.</p></div>
+<div class="paragraph"><p>For example, to run all tests from the <code>cow_http_hd</code>
+module (instead of all tests from the entire project),
+one could write:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd</tt></pre></div></div>
+<div class="paragraph"><p>Similarly, to run a specific test case:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd<span style="color: #990000">:</span>parse_accept_test_</tt></pre></div></div>
+<div class="paragraph"><p>To do the same against a multi-application repository,
+you can use the <code>-C</code> option:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -C apps/my_app eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>my_module<span style="color: #990000">:</span>hello_test</tt></pre></div></div>
+<div class="paragraph"><p>Note that this also applies to dependencies. From Cowboy,
+you can run the following directly:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -C deps/cowlib eunit <span style="color: #009900">t</span><span style="color: #990000">=</span>cow_http_hd</tt></pre></div></div>
+<div class="paragraph"><p>Finally, <a href="../coverage">code coverage</a> is available,
+but covered in its own chapter.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/external_plugins.asciidoc b/docs/en/erlang.mk/1/guide/external_plugins.asciidoc
new file mode 100644
index 00000000..d3dafaac
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/external_plugins.asciidoc
@@ -0,0 +1,77 @@
+[[plugins_usage]]
+== External plugins
+
+It is often convenient to be able to keep the build files
+used by all your projects in one place. Those files could
+be Makefiles, configuration files, templates and more.
+
+Erlang.mk allows you to automatically load plugins from
+dependencies. Plugins can do anything, including defining
+new variables, defining file templates, hooking themselves
+inside the normal Erlang.mk processing or even adding new
+rules.
+
+You can load plugins using one of two methods. You can
+either load all plugins from a dependency, or just one.
+We will also cover conventions about writing external
+plugins.
+
+=== Loading all plugins from a dependency
+
+To load plugins from a dependency, all you need to do is add
+the dependency name to `DEP_PLUGINS` in addition to the list
+of dependencies.
+
+For example, if you have `cowboy` in `DEPS`, add `cowboy` in
+`DEP_PLUGINS` also:
+
+[source,make]
+DEPS = cowboy
+DEP_PLUGINS = cowboy
+
+This will load the file 'plugins.mk' in the root folder of
+the Cowboy repository.
+
+=== Loading one plugin from a dependency
+
+Now that we know how to load all plugins, let's take a look
+at how to load one specific plugin from a dependency.
+
+To do this, instead of writing only the name of the dependency,
+we will write its name and the path to the plugin file. This
+means that writing `DEP_PLUGINS = cowboy` is equivalent to
+writing `DEP_PLUGINS = cowboy/plugins.mk`.
+
+Knowing this, if we were to load the plugin 'mk/dist.mk'
+from Cowboy and no other, we would write the following in
+our Makefile:
+
+[source,make]
+DEPS = cowboy
+DEP_PLUGINS = cowboy/mk/dist.mk
+
+=== Writing external plugins
+
+The 'plugins.mk' file is a convention. It is meant to load
+all the plugins from the dependency. The code for the plugin
+can be written directly in 'plugins.mk' or be separate.
+
+If you are providing more than one plugin with your repository,
+the recommended way is to create one file per plugin in the
+'mk/' folder in your repository, and then include those
+individual plugins in 'plugins.mk'.
+
+For example, if you have two plugins 'mk/dist.mk' and
+'mk/templates.mk', you could write the following 'plugins.mk'
+file:
+
+[source,make]
+THIS := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
+include $(THIS)/mk/dist.mk
+include $(THIS)/mk/templates.mk
+
+The `THIS` variable is required to relatively include files.
+
+This allows users to not only be able to select individual
+plugins, but also select all plugins from the dependency
+in one go if they wish to do so.
diff --git a/docs/en/erlang.mk/1/guide/external_plugins/index.html b/docs/en/erlang.mk/1/guide/external_plugins/index.html
new file mode 100644
index 00000000..8b52c986
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/external_plugins/index.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: External plugins</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>External plugins</span></h1>
+
+<div class="paragraph"><p>It is often convenient to be able to keep the build files
+used by all your projects in one place. Those files could
+be Makefiles, configuration files, templates and more.</p></div>
+<div class="paragraph"><p>Erlang.mk allows you to automatically load plugins from
+dependencies. Plugins can do anything, including defining
+new variables, defining file templates, hooking themselves
+inside the normal Erlang.mk processing or even adding new
+rules.</p></div>
+<div class="paragraph"><p>You can load plugins using one of two methods. You can
+either load all plugins from a dependency, or just one.
+We will also cover conventions about writing external
+plugins.</p></div>
+<div class="sect1">
+<h2 id="_loading_all_plugins_from_a_dependency">Loading all plugins from a dependency</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To load plugins from a dependency, all you need to do is add
+the dependency name to <code>DEP_PLUGINS</code> in addition to the list
+of dependencies.</p></div>
+<div class="paragraph"><p>For example, if you have <code>cowboy</code> in <code>DEPS</code>, add <code>cowboy</code> in
+<code>DEP_PLUGINS</code> also:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">DEP_PLUGINS =</span> cowboy</tt></pre></div></div>
+<div class="paragraph"><p>This will load the file <em>plugins.mk</em> in the root folder of
+the Cowboy repository.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_loading_one_plugin_from_a_dependency">Loading one plugin from a dependency</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Now that we know how to load all plugins, let&#8217;s take a look
+at how to load one specific plugin from a dependency.</p></div>
+<div class="paragraph"><p>To do this, instead of writing only the name of the dependency,
+we will write its name and the path to the plugin file. This
+means that writing <code>DEP_PLUGINS = cowboy</code> is equivalent to
+writing <code>DEP_PLUGINS = cowboy/plugins.mk</code>.</p></div>
+<div class="paragraph"><p>Knowing this, if we were to load the plugin <em>mk/dist.mk</em>
+from Cowboy and no other, we would write the following in
+our Makefile:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> cowboy
+<span style="color: #009900">DEP_PLUGINS =</span> cowboy/mk/dist.mk</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_writing_external_plugins">Writing external plugins</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <em>plugins.mk</em> file is a convention. It is meant to load
+all the plugins from the dependency. The code for the plugin
+can be written directly in <em>plugins.mk</em> or be separate.</p></div>
+<div class="paragraph"><p>If you are providing more than one plugin with your repository,
+the recommended way is to create one file per plugin in the
+<em>mk/</em> folder in your repository, and then include those
+individual plugins in <em>plugins.mk</em>.</p></div>
+<div class="paragraph"><p>For example, if you have two plugins <em>mk/dist.mk</em> and
+<em>mk/templates.mk</em>, you could write the following <em>plugins.mk</em>
+file:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #990000">THIS :=</span> <span style="color: #009900">$(</span>dir <span style="color: #009900">$(</span>realpath <span style="color: #009900">$(</span>lastword <span style="color: #009900">$(MAKEFILE_LIST))))</span>
+include <span style="color: #009900">$(THIS)</span>/mk/dist.mk
+include <span style="color: #009900">$(THIS)</span>/mk/templates.mk</tt></pre></div></div>
+<div class="paragraph"><p>The <code>THIS</code> variable is required to relatively include files.</p></div>
+<div class="paragraph"><p>This allows users to not only be able to select individual
+plugins, but also select all plugins from the dependency
+in one go if they wish to do so.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc b/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc
new file mode 100644
index 00000000..f30797fd
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc
@@ -0,0 +1,48 @@
+[[plugins_list]]
+== List of plugins
+
+This is a non-exhaustive list of Erlang.mk plugins, sorted
+alphabetically.
+
+=== efene.mk
+
+An https://github.com/ninenines/efene.mk[Efene plugin] for Erlang.mk.
+http://efene.org/[Efene] is an alternative language for the BEAM.
+
+=== elixir.mk
+
+An https://github.com/botsunit/elixir.mk[Elixir plugin] for
+Erlang.mk. http://elixir-lang.org/[Elixir] is an alternative
+language for the BEAM.
+
+=== elvis.mk
+
+An https://github.com/inaka/elvis.mk[Elvis plugin] for Erlang.mk.
+Elvis is an https://github.com/inaka/elvis[Erlang style reviewer].
+
+=== geas
+
+https://github.com/crownedgrouse/geas[Geas] gives aggregated
+information on a project and its dependencies, and is available
+as an Erlang.mk plugin.
+
+=== hexer.mk
+
+An https://github.com/inaka/hexer.mk[Hex plugin] for Erlang.mk.
+Hex is a https://hex.pm/[package manager for the Elixir ecosystem].
+
+=== lfe.mk
+
+An https://github.com/ninenines/lfe.mk[LFE plugin] for Erlang.mk.
+LFE, or http://lfe.io/[Lisp Flavoured Erlang], is an alternative
+language for the BEAM.
+
+=== mix.mk
+
+A https://github.com/botsunit/mix.mk[Mix plugin] for Erlang.mk,
+to generate a compatible configuration file for
+http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html[Mix].
+
+=== reload.mk
+
+A https://github.com/bullno1/reload.mk[live reload plugin] for Erlang.mk.
diff --git a/docs/en/erlang.mk/1/guide/external_plugins_list/index.html b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html
new file mode 100644
index 00000000..405783c5
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html
@@ -0,0 +1,197 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: List of plugins</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>List of plugins</span></h1>
+
+<div class="paragraph"><p>This is a non-exhaustive list of Erlang.mk plugins, sorted
+alphabetically.</p></div>
+<div class="sect1">
+<h2 id="_efene_mk">efene.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <a href="https://github.com/ninenines/efene.mk">Efene plugin</a> for Erlang.mk.
+<a href="http://efene.org/">Efene</a> is an alternative language for the BEAM.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_elixir_mk">elixir.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <a href="https://github.com/botsunit/elixir.mk">Elixir plugin</a> for
+Erlang.mk. <a href="http://elixir-lang.org/">Elixir</a> is an alternative
+language for the BEAM.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_elvis_mk">elvis.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <a href="https://github.com/inaka/elvis.mk">Elvis plugin</a> for Erlang.mk.
+Elvis is an <a href="https://github.com/inaka/elvis">Erlang style reviewer</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_geas">geas</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="https://github.com/crownedgrouse/geas">Geas</a> gives aggregated
+information on a project and its dependencies, and is available
+as an Erlang.mk plugin.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hexer_mk">hexer.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <a href="https://github.com/inaka/hexer.mk">Hex plugin</a> for Erlang.mk.
+Hex is a <a href="https://hex.pm/">package manager for the Elixir ecosystem</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_lfe_mk">lfe.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <a href="https://github.com/ninenines/lfe.mk">LFE plugin</a> for Erlang.mk.
+LFE, or <a href="http://lfe.io/">Lisp Flavoured Erlang</a>, is an alternative
+language for the BEAM.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_mix_mk">mix.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>A <a href="https://github.com/botsunit/mix.mk">Mix plugin</a> for Erlang.mk,
+to generate a compatible configuration file for
+<a href="http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html">Mix</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_reload_mk">reload.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>A <a href="https://github.com/bullno1/reload.mk">live reload plugin</a> for Erlang.mk.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/getting_started.asciidoc b/docs/en/erlang.mk/1/guide/getting_started.asciidoc
new file mode 100644
index 00000000..ef2f6e8e
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/getting_started.asciidoc
@@ -0,0 +1,299 @@
+[[getting_started]]
+== Getting started
+
+This chapter explains how to get started using Erlang.mk.
+
+=== Creating a folder for your project
+
+The first step is always to create a new folder that will
+contain your project.
+
+[source,bash]
+$ mkdir hello_joe
+$ cd hello_joe
+
+Most people tend to put all their projects side by side in
+a common folder. We recommend keeping an organization similar
+to your remote repositories. For example, for GitHub users,
+put all your projects in a common folder with the same name
+as your username. For example '$HOME/ninenines/cowboy' for
+the Cowboy project.
+
+=== Downloading Erlang.mk
+
+At the time of writing, Erlang.mk is unlikely to be present
+in your Erlang distribution, or even in your OS packages.
+
+The next step is therefore to download it:
+
+[source,bash]
+$ wget https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk
+
+Or:
+
+[source,bash]
+$ curl https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk
+
+Alternatively, just https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk[click on this link].
+
+Make sure you put the file inside the folder we created previously.
+
+=== Getting started with OTP applications
+
+An OTP application is an Erlang application that has a supervision
+tree. In other words, it will always have processes running.
+
+This kind of project can be automatically generated by Erlang.mk.
+All you need to do is use the `bootstrap` target:
+
+[source,bash]
+$ make -f erlang.mk bootstrap
+
+Something similar to the following snippet will then appear
+on your screen:
+
+[source,bash]
+----
+git clone https://github.com/ninenines/erlang.mk .erlang.mk.build
+Cloning into '.erlang.mk.build'...
+remote: Counting objects: 4035, done.
+remote: Compressing objects: 100% (12/12), done.
+remote: Total 4035 (delta 8), reused 4 (delta 4), pack-reused 4019
+Receiving objects: 100% (4035/4035), 1.10 MiB | 784.00 KiB/s, done.
+Resolving deltas: 100% (2442/2442), done.
+Checking connectivity... done.
+if [ -f build.config ]; then cp build.config .erlang.mk.build; fi
+cd .erlang.mk.build && make
+make[1]: Entering directory '/home/essen/tmp/hello_joe/.erlang.mk.build'
+awk 'FNR==1 && NR!=1{print ""}1' core/core.mk index/*.mk core/index.mk core/deps.mk plugins/protobuffs.mk core/erlc.mk core/docs.mk core/test.mk plugins/asciidoc.mk plugins/bootstrap.mk plugins/c_src.mk plugins/ci.mk plugins/ct.mk plugins/dialyzer.mk plugins/edoc.mk plugins/elvis.mk plugins/erlydtl.mk plugins/escript.mk plugins/eunit.mk plugins/relx.mk plugins/shell.mk plugins/triq.mk plugins/xref.mk plugins/cover.mk \
+ | sed 's/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/' > erlang.mk
+make[1]: Leaving directory '/home/essen/tmp/hello_joe/.erlang.mk.build'
+cp .erlang.mk.build/erlang.mk ./erlang.mk
+rm -rf .erlang.mk.build
+----
+
+This is Erlang.mk bootstrapping itself. Indeed, the file you
+initially downloaded contains nothing more than the code needed
+to bootstrap. This operation is done only once. Consult the
+xref:updating[Updating Erlang.mk] chapter for more
+information.
+
+Of course, the generated project can now be compiled:
+
+[source,bash]
+$ make
+
+Cheers!
+
+=== Getting started with OTP libraries
+
+An OTP library is an Erlang application that has no supervision
+tree. In other words, it is nothing but modules.
+
+This kind of project can also be generated by Erlang.mk, using
+the `bootstrap-lib` target:
+
+[source,bash]
+$ make -f erlang.mk bootstrap-lib
+
+Erlang.mk will once again bootstrap itself and generate all
+the files for your project. You can now compile it:
+
+[source,bash]
+$ make
+
+Enjoy!
+
+=== Getting started with OTP releases
+
+An OTP release is the combination of the Erlang RunTime System (ERTS)
+along with all the libraries and files that your node will need
+to run. It is entirely self contained, and can often be sent as-is
+to your production system and run without any extra setup.
+
+Erlang.mk can of course bootstrap your project to generate releases.
+You can use the `bootstrap-rel` target for this purpose:
+
+[source,bash]
+$ make bootstrap-rel
+
+This target can be combined with `bootstrap` or `bootstrap-lib` to
+create a project that will build a release:
+
+[source,bash]
+$ make -f erlang.mk bootstrap-lib bootstrap-rel
+
+It is often very useful to keep the top-level project for
+commands useful during operations, and put the components
+of the system in separate applications that you will then
+depend on. Consult the xref:deps[Packages and dependencies]
+chapter for more information.
+
+When you run `make` from now on, Erlang.mk will compile your
+project and build the release:
+
+[source,bash]
+$ make
+ APP hello_joe.app.src
+ GEN distclean-relx-rel
+ GEN /home/essen/tmp/hello_joe/relx
+===> Starting relx build process ...
+===> Resolving OTP Applications from directories:
+ /home/essen/tmp/hello_joe/ebin
+ /usr/lib/erlang/lib
+ /home/essen/tmp/hello_joe/deps
+===> Resolved hello_joe_release-1
+===> Including Erts from /usr/lib/erlang
+===> release successfully created!
+
+The first time you run this command, Erlang.mk will download
+_relx_, the release building tool. So don't worry if you see
+more output than above.
+
+If building the release is slow, no need to upgrade your
+hardware just yet. Just consult the xref:relx[Releases]
+chapter for various tips to speed up build time during
+development.
+
+You can start the release using the './_rel/hello_joe_release/bin/hello_joe_release'
+script, or simply run `make run`. The latter will also compile
+your project and build the release if it wasn't already:
+
+[source,bash]
+----
+$ make run
+ APP hello_joe.app.src
+ GEN distclean-relx-rel
+===> Starting relx build process ...
+===> Resolving OTP Applications from directories:
+ /home/essen/tmp/hello_joe/ebin
+ /usr/lib/erlang/lib
+ /home/essen/tmp/hello_joe/deps
+===> Resolved hello_joe_release-1
+===> Including Erts from /usr/lib/erlang
+===> release successfully created!
+Exec: /home/essen/tmp/hello_joe/_rel/hello_joe_release/erts-7.0/bin/erlexec -boot /home/essen/tmp/hello_joe/_rel/hello_joe_release/releases/1/hello_joe_release -boot_var ERTS_LIB_DIR /home/essen/tmp/hello_joe/_rel/hello_joe_release/erts-7.0/../lib -env ERL_LIBS /home/essen/tmp/hello_joe/_rel/hello_joe_release/releases/1/lib -config /home/essen/tmp/hello_joe/_rel/hello_joe_release/releases/1/sys.config -args_file /home/essen/tmp/hello_joe/_rel/hello_joe_release/releases/1/vm.args -- console
+Root: /home/essen/tmp/hello_joe/_rel/hello_joe_release
+/home/essen/tmp/hello_joe/_rel/hello_joe_release
+heart_beat_kill_pid = 16389
+Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
+
+Eshell V7.0 (abort with ^G)
+----
+
+Simple as that!
+
+=== Using spaces instead of tabs
+
+Erlang.mk defaults to tabs when creating files from templates.
+This is in part because of a personal preference, and in part
+because it is much easier to convert tabs to spaces than the
+opposite.
+
+Use the `SP` variable if you prefer spaces. Set it to the number
+of spaces per indentation level you want.
+
+For example, if you prefer two spaces per indentation level:
+
+[source,bash]
+$ make -f erlang.mk bootstrap SP=2
+
+When you bootstrap the project initially, the variable automatically
+gets added to the Makefile, so you only need to provide it when
+you get started.
+
+=== Using templates
+
+It is no secret that Erlang's OTP behaviors tend to have some
+boilerplate. It is rarely an issue of course, except when
+creating new modules. That's why Erlang.mk not only comes with
+templates for generating projects, but also individual modules!
+
+You can list all available templates with the `list-templates`
+target:
+
+[source,bash]
+$ make list-templates
+Available templates: cowboy_http cowboy_loop cowboy_rest cowboy_ws gen_fsm gen_server ranch_protocol supervisor
+
+To generate a module, let's say a `gen_server`, all you need to
+do is to call `make new` with the appropriate arguments:
+
+[source,bash]
+$ make new t=gen_server n=my_server
+
+This will create a module located in 'src/my_server.erl'
+using the `gen_server` template.
+
+This module is automatically compiled the next time you run
+`make`:
+
+[source,bash]
+$ make
+ ERLC my_server.erl
+ APP hello_joe.app.src
+
+All that's left to do is to open it in your favorite editor
+and make it do something!
+
+=== Hiding Erlang.mk from git
+
+Erlang.mk is a large text file. It can easily take a large part of
+a `git diff` or a `git grep` command. You can avoid this by telling
+Git that 'erlang.mk' is a binary file.
+
+Add this to your '.gitattributes' file. This is a file that you
+can create at the root of your repository:
+
+----
+erlang.mk -diff
+----
+
+The 'erlang.mk' file will still appear in diffs and greps, but
+as a binary file, meaning its contents won't be shown by default
+anymore.
+
+=== Getting help
+
+During development, if you don't remember the name of a target,
+you can always run `make help`:
+
+[source,bash]
+----
+$ make help
+erlang.mk (version 1.2.0-642-gccd2b9f) is distributed under the terms of the ISC License.
+Copyright (c) 2013-2015 Loïc Hoguin <[email protected]>
+
+Usage: [V=1] make [target]...
+
+Core targets:
+ all Run deps, app and rel targets in that order
+ app Compile the project
+ deps Fetch dependencies (if needed) and compile them
+ search q=... Search for a package in the built-in index
+ rel Build a release for this project, if applicable
+ docs Build the documentation for this project
+ install-docs Install the man pages for this project
+ check Compile and run all tests and analysis for this project
+ tests Run the tests for this project
+ clean Delete temporary and output files from most targets
+ distclean Delete all temporary and output files
+ help Display this help and exit
+ erlang-mk Update erlang.mk to the latest version
+
+Bootstrap targets:
+ bootstrap Generate a skeleton of an OTP application
+ bootstrap-lib Generate a skeleton of an OTP library
+ bootstrap-rel Generate the files needed to build a release
+ new t=TPL n=NAME Generate a module NAME based on the template TPL
+ list-templates List available templates
+...
+----
+
+This guide should provide any other answer. If not, please
+open a ticket on https://github.com/ninenines/erlang.mk/issues[the official repository]
+and we will work on improving the guide.
+
+Commercial support is available through Nine Nines. Please contact
+Loïc Hoguin by sending an email to mailto:[email protected][].
diff --git a/docs/en/erlang.mk/1/guide/getting_started/index.html b/docs/en/erlang.mk/1/guide/getting_started/index.html
new file mode 100644
index 00000000..5619b384
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/getting_started/index.html
@@ -0,0 +1,462 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Getting started</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Getting started</span></h1>
+
+<div class="paragraph"><p>This chapter explains how to get started using Erlang.mk.</p></div>
+<div class="sect1">
+<h2 id="_creating_a_folder_for_your_project">Creating a folder for your project</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The first step is always to create a new folder that will
+contain your project.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ mkdir hello_joe
+$ cd hello_joe</tt></pre></div></div>
+<div class="paragraph"><p>Most people tend to put all their projects side by side in
+a common folder. We recommend keeping an organization similar
+to your remote repositories. For example, for GitHub users,
+put all your projects in a common folder with the same name
+as your username. For example <em>$HOME/ninenines/cowboy</em> for
+the Cowboy project.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_downloading_erlang_mk">Downloading Erlang.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>At the time of writing, Erlang.mk is unlikely to be present
+in your Erlang distribution, or even in your OS packages.</p></div>
+<div class="paragraph"><p>The next step is therefore to download it:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ wget https<span style="color: #990000">:</span>//raw<span style="color: #990000">.</span>githubusercontent<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk/master/erlang<span style="color: #990000">.</span>mk</tt></pre></div></div>
+<div class="paragraph"><p>Or:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ curl https<span style="color: #990000">:</span>//raw<span style="color: #990000">.</span>githubusercontent<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk/master/erlang<span style="color: #990000">.</span>mk</tt></pre></div></div>
+<div class="paragraph"><p>Alternatively, just <a href="https://raw.githubusercontent.com/ninenines/erlang.mk/master/erlang.mk">click on this link</a>.</p></div>
+<div class="paragraph"><p>Make sure you put the file inside the folder we created previously.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_getting_started_with_otp_applications">Getting started with OTP applications</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An OTP application is an Erlang application that has a supervision
+tree. In other words, it will always have processes running.</p></div>
+<div class="paragraph"><p>This kind of project can be automatically generated by Erlang.mk.
+All you need to do is use the <code>bootstrap</code> target:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap</tt></pre></div></div>
+<div class="paragraph"><p>Something similar to the following snippet will then appear
+on your screen:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build
+Cloning into <span style="color: #FF0000">'.erlang.mk.build'</span><span style="color: #990000">...</span>
+remote<span style="color: #990000">:</span> Counting objects<span style="color: #990000">:</span> <span style="color: #993399">4035</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+remote<span style="color: #990000">:</span> Compressing objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">12</span><span style="color: #990000">/</span><span style="color: #993399">12</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+remote<span style="color: #990000">:</span> Total <span style="color: #993399">4035</span> <span style="color: #990000">(</span>delta <span style="color: #993399">8</span><span style="color: #990000">),</span> reused <span style="color: #993399">4</span> <span style="color: #990000">(</span>delta <span style="color: #993399">4</span><span style="color: #990000">),</span> pack-reused <span style="color: #993399">4019</span>
+Receiving objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">4035</span><span style="color: #990000">/</span><span style="color: #993399">4035</span><span style="color: #990000">),</span> <span style="color: #993399">1.10</span> MiB <span style="color: #990000">|</span> <span style="color: #993399">784.00</span> KiB/s<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+Resolving deltas<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">2442</span><span style="color: #990000">/</span><span style="color: #993399">2442</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+Checking connectivity<span style="color: #990000">...</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">[</span> -f build<span style="color: #990000">.</span>config <span style="color: #990000">];</span> <span style="font-weight: bold"><span style="color: #0000FF">then</span></span> cp build<span style="color: #990000">.</span>config <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build<span style="color: #990000">;</span> <span style="font-weight: bold"><span style="color: #0000FF">fi</span></span>
+cd <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build <span style="color: #990000">&amp;&amp;</span> make
+make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Entering directory <span style="color: #FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</span>
+awk <span style="color: #FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</span> core/core<span style="color: #990000">.</span>mk index<span style="color: #990000">/*.</span>mk core/index<span style="color: #990000">.</span>mk core/deps<span style="color: #990000">.</span>mk plugins/protobuffs<span style="color: #990000">.</span>mk core/erlc<span style="color: #990000">.</span>mk core/docs<span style="color: #990000">.</span>mk core/test<span style="color: #990000">.</span>mk plugins/asciidoc<span style="color: #990000">.</span>mk plugins/bootstrap<span style="color: #990000">.</span>mk plugins/c_src<span style="color: #990000">.</span>mk plugins/ci<span style="color: #990000">.</span>mk plugins/ct<span style="color: #990000">.</span>mk plugins/dialyzer<span style="color: #990000">.</span>mk plugins/edoc<span style="color: #990000">.</span>mk plugins/elvis<span style="color: #990000">.</span>mk plugins/erlydtl<span style="color: #990000">.</span>mk plugins/escript<span style="color: #990000">.</span>mk plugins/eunit<span style="color: #990000">.</span>mk plugins/relx<span style="color: #990000">.</span>mk plugins/shell<span style="color: #990000">.</span>mk plugins/triq<span style="color: #990000">.</span>mk plugins/xref<span style="color: #990000">.</span>mk plugins/cover<span style="color: #990000">.</span>mk <span style="color: #990000">\</span>
+ <span style="color: #990000">|</span> sed <span style="color: #FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</span> <span style="color: #990000">&gt;</span> erlang<span style="color: #990000">.</span>mk
+make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Leaving directory <span style="color: #FF0000">'/home/essen/tmp/hello_joe/.erlang.mk.build'</span>
+cp <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>/erlang<span style="color: #990000">.</span>mk
+rm -rf <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build</tt></pre></div></div>
+<div class="paragraph"><p>This is Erlang.mk bootstrapping itself. Indeed, the file you
+initially downloaded contains nothing more than the code needed
+to bootstrap. This operation is done only once. Consult the
+<a href="../updating">Updating Erlang.mk</a> chapter for more
+information.</p></div>
+<div class="paragraph"><p>Of course, the generated project can now be compiled:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make</tt></pre></div></div>
+<div class="paragraph"><p>Cheers!</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_getting_started_with_otp_libraries">Getting started with OTP libraries</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An OTP library is an Erlang application that has no supervision
+tree. In other words, it is nothing but modules.</p></div>
+<div class="paragraph"><p>This kind of project can also be generated by Erlang.mk, using
+the <code>bootstrap-lib</code> target:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap-lib</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk will once again bootstrap itself and generate all
+the files for your project. You can now compile it:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make</tt></pre></div></div>
+<div class="paragraph"><p>Enjoy!</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_getting_started_with_otp_releases">Getting started with OTP releases</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An OTP release is the combination of the Erlang RunTime System (ERTS)
+along with all the libraries and files that your node will need
+to run. It is entirely self contained, and can often be sent as-is
+to your production system and run without any extra setup.</p></div>
+<div class="paragraph"><p>Erlang.mk can of course bootstrap your project to generate releases.
+You can use the <code>bootstrap-rel</code> target for this purpose:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make bootstrap-rel</tt></pre></div></div>
+<div class="paragraph"><p>This target can be combined with <code>bootstrap</code> or <code>bootstrap-lib</code> to
+create a project that will build a release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap-lib bootstrap-rel</tt></pre></div></div>
+<div class="paragraph"><p>It is often very useful to keep the top-level project for
+commands useful during operations, and put the components
+of the system in separate applications that you will then
+depend on. Consult the <a href="../deps">Packages and dependencies</a>
+chapter for more information.</p></div>
+<div class="paragraph"><p>When you run <code>make</code> from now on, Erlang.mk will compile your
+project and build the release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make
+ APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src
+ GEN distclean-relx-rel
+ GEN /home/essen/tmp/hello_joe/relx
+<span style="color: #990000">===&gt;</span> Starting relx build process <span style="color: #990000">...</span>
+<span style="color: #990000">===&gt;</span> Resolving OTP Applications from directories<span style="color: #990000">:</span>
+ /home/essen/tmp/hello_joe/ebin
+ /usr/lib/erlang/lib
+ /home/essen/tmp/hello_joe/deps
+<span style="color: #990000">===&gt;</span> Resolved hello_joe_release-<span style="color: #993399">1</span>
+<span style="color: #990000">===&gt;</span> Including Erts from /usr/lib/erlang
+<span style="color: #990000">===&gt;</span> release successfully created<span style="color: #990000">!</span></tt></pre></div></div>
+<div class="paragraph"><p>The first time you run this command, Erlang.mk will download
+<em>relx</em>, the release building tool. So don&#8217;t worry if you see
+more output than above.</p></div>
+<div class="paragraph"><p>If building the release is slow, no need to upgrade your
+hardware just yet. Just consult the <a href="../relx">Releases</a>
+chapter for various tips to speed up build time during
+development.</p></div>
+<div class="paragraph"><p>You can start the release using the <em>./_rel/hello_joe_release/bin/hello_joe_release</em>
+script, or simply run <code>make run</code>. The latter will also compile
+your project and build the release if it wasn&#8217;t already:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make run
+ APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src
+ GEN distclean-relx-rel
+<span style="color: #990000">===&gt;</span> Starting relx build process <span style="color: #990000">...</span>
+<span style="color: #990000">===&gt;</span> Resolving OTP Applications from directories<span style="color: #990000">:</span>
+ /home/essen/tmp/hello_joe/ebin
+ /usr/lib/erlang/lib
+ /home/essen/tmp/hello_joe/deps
+<span style="color: #990000">===&gt;</span> Resolved hello_joe_release-<span style="color: #993399">1</span>
+<span style="color: #990000">===&gt;</span> Including Erts from /usr/lib/erlang
+<span style="color: #990000">===&gt;</span> release successfully created<span style="color: #990000">!</span>
+Exec<span style="color: #990000">:</span> /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/erts-<span style="color: #993399">7.0</span>/bin/erlexec -boot /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/hello_joe_release -boot_var ERTS_LIB_DIR /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/erts-<span style="color: #993399">7.0</span><span style="color: #990000">/..</span>/lib -env ERL_LIBS /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/lib -config /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/sys<span style="color: #990000">.</span>config -args_file /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release/releases<span style="color: #990000">/</span><span style="color: #993399">1</span>/vm<span style="color: #990000">.</span>args -- console
+Root<span style="color: #990000">:</span> /home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release
+/home/essen/tmp/hello_joe<span style="color: #990000">/</span>_rel/hello_joe_release
+heart_beat_kill_pid <span style="color: #990000">=</span> <span style="color: #993399">16389</span>
+Erlang/OTP <span style="color: #993399">18</span> <span style="color: #990000">[</span>erts-<span style="color: #993399">7.0</span><span style="color: #990000">]</span> <span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #0000FF">source</span></span><span style="color: #990000">]</span> <span style="color: #990000">[</span><span style="color: #993399">64</span>-bit<span style="color: #990000">]</span> <span style="color: #990000">[</span>smp<span style="color: #990000">:</span><span style="color: #993399">4</span><span style="color: #990000">:</span><span style="color: #993399">4</span><span style="color: #990000">]</span> <span style="color: #990000">[</span>async-threads<span style="color: #990000">:</span><span style="color: #993399">10</span><span style="color: #990000">]</span> <span style="color: #990000">[</span>hipe<span style="color: #990000">]</span> <span style="color: #990000">[</span>kernel-poll<span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #0000FF">false</span></span><span style="color: #990000">]</span>
+
+Eshell V7<span style="color: #990000">.</span><span style="color: #993399">0</span> <span style="color: #990000">(</span>abort with <span style="color: #990000">^</span>G<span style="color: #990000">)</span>
+<span style="color: #990000">(</span>hello_joe@<span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">)</span><span style="color: #993399">1</span><span style="color: #990000">&gt;</span></tt></pre></div></div>
+<div class="paragraph"><p>Simple as that!</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_spaces_instead_of_tabs">Using spaces instead of tabs</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk defaults to tabs when creating files from templates.
+This is in part because of a personal preference, and in part
+because it is much easier to convert tabs to spaces than the
+opposite.</p></div>
+<div class="paragraph"><p>Use the <code>SP</code> variable if you prefer spaces. Set it to the number
+of spaces per indentation level you want.</p></div>
+<div class="paragraph"><p>For example, if you prefer two spaces per indentation level:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make -f erlang<span style="color: #990000">.</span>mk bootstrap <span style="color: #009900">SP</span><span style="color: #990000">=</span><span style="color: #993399">2</span></tt></pre></div></div>
+<div class="paragraph"><p>When you bootstrap the project initially, the variable automatically
+gets added to the Makefile, so you only need to provide it when
+you get started.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_templates">Using templates</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It is no secret that Erlang&#8217;s OTP behaviors tend to have some
+boilerplate. It is rarely an issue of course, except when
+creating new modules. That&#8217;s why Erlang.mk not only comes with
+templates for generating projects, but also individual modules!</p></div>
+<div class="paragraph"><p>You can list all available templates with the <code>list-templates</code>
+target:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make list-templates
+Available templates<span style="color: #990000">:</span> cowboy_http cowboy_loop cowboy_rest cowboy_ws gen_fsm gen_server ranch_protocol supervisor</tt></pre></div></div>
+<div class="paragraph"><p>To generate a module, let&#8217;s say a <code>gen_server</code>, all you need to
+do is to call <code>make new</code> with the appropriate arguments:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make new <span style="color: #009900">t</span><span style="color: #990000">=</span>gen_server <span style="color: #009900">n</span><span style="color: #990000">=</span>my_server</tt></pre></div></div>
+<div class="paragraph"><p>This will create a module located in <em>src/my_server.erl</em>
+using the <code>gen_server</code> template.</p></div>
+<div class="paragraph"><p>This module is automatically compiled the next time you run
+<code>make</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make
+ ERLC my_server<span style="color: #990000">.</span>erl
+ APP hello_joe<span style="color: #990000">.</span>app<span style="color: #990000">.</span>src</tt></pre></div></div>
+<div class="paragraph"><p>All that&#8217;s left to do is to open it in your favorite editor
+and make it do something!</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hiding_erlang_mk_from_git">Hiding Erlang.mk from git</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk is a large text file. It can easily take a large part of
+a <code>git diff</code> or a <code>git grep</code> command. You can avoid this by telling
+Git that <em>erlang.mk</em> is a binary file.</p></div>
+<div class="paragraph"><p>Add this to your <em>.gitattributes</em> file. This is a file that you
+can create at the root of your repository:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>erlang.mk -diff</code></pre>
+</div></div>
+<div class="paragraph"><p>The <em>erlang.mk</em> file will still appear in diffs and greps, but
+as a binary file, meaning its contents won&#8217;t be shown by default
+anymore.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_getting_help">Getting help</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>During development, if you don&#8217;t remember the name of a target,
+you can always run <code>make help</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make <span style="font-weight: bold"><span style="color: #0000FF">help</span></span>
+erlang<span style="color: #990000">.</span>mk <span style="color: #990000">(</span>version <span style="color: #993399">1.2</span><span style="color: #990000">.</span><span style="color: #993399">0</span>-<span style="color: #993399">642</span>-gccd2b9f<span style="color: #990000">)</span> is distributed under the terms of the ISC License<span style="color: #990000">.</span>
+Copyright <span style="color: #990000">(</span>c<span style="color: #990000">)</span> <span style="color: #993399">2013</span>-<span style="color: #993399">2015</span> Loïc Hoguin <span style="color: #990000">&lt;</span>essen@ninenines<span style="color: #990000">.</span>eu<span style="color: #990000">&gt;</span>
+
+Usage<span style="color: #990000">:</span> <span style="color: #990000">[</span><span style="color: #009900">V</span><span style="color: #990000">=</span><span style="color: #993399">1</span><span style="color: #990000">]</span> make <span style="color: #990000">[</span>target<span style="color: #990000">]...</span>
+
+Core targets<span style="color: #990000">:</span>
+ all Run deps<span style="color: #990000">,</span> app and rel targets <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> that order
+ app Compile the project
+ deps Fetch dependencies <span style="color: #990000">(</span><span style="font-weight: bold"><span style="color: #0000FF">if</span></span> needed<span style="color: #990000">)</span> and compile them
+ search <span style="color: #009900">q</span><span style="color: #990000">=...</span> Search <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> a package <span style="font-weight: bold"><span style="color: #0000FF">in</span></span> the built-in index
+ rel Build a release <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">if</span></span> applicable
+ docs Build the documentation <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
+ install-docs Install the man pages <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
+ check Compile and run all tests and analysis <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
+ tests Run the tests <span style="font-weight: bold"><span style="color: #0000FF">for</span></span> this project
+ clean Delete temporary and output files from most targets
+ distclean Delete all temporary and output files
+ <span style="font-weight: bold"><span style="color: #0000FF">help</span></span> Display this <span style="font-weight: bold"><span style="color: #0000FF">help</span></span> and <span style="font-weight: bold"><span style="color: #0000FF">exit</span></span>
+ erlang-mk Update erlang<span style="color: #990000">.</span>mk to the latest version
+
+Bootstrap targets<span style="color: #990000">:</span>
+ bootstrap Generate a skeleton of an OTP application
+ bootstrap-lib Generate a skeleton of an OTP library
+ bootstrap-rel Generate the files needed to build a release
+ new <span style="color: #009900">t</span><span style="color: #990000">=</span>TPL <span style="color: #009900">n</span><span style="color: #990000">=</span>NAME Generate a module NAME based on the template TPL
+ list-templates List available templates
+<span style="color: #990000">...</span></tt></pre></div></div>
+<div class="paragraph"><p>This guide should provide any other answer. If not, please
+open a ticket on <a href="https://github.com/ninenines/erlang.mk/issues">the official repository</a>
+and we will work on improving the guide.</p></div>
+<div class="paragraph"><p>Commercial support is available through Nine Nines. Please contact
+Loïc Hoguin by sending an email to <a href="mailto:[email protected]">[email protected]</a>.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/history.asciidoc b/docs/en/erlang.mk/1/guide/history.asciidoc
new file mode 100644
index 00000000..92027430
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/history.asciidoc
@@ -0,0 +1,66 @@
+[[history]]
+== Short history
+
+This chapter aims to be a brief record of the life of the
+Erlang.mk project.
+
+=== Before Erlang.mk
+
+Erlang.mk originates from the Cowboy project. Cowboy started
+as a Rebar project and I, Loïc Hoguin, was very happy with it
+for a couple years. Over time however I started getting annoyed
+and frustrated by a number of things, including bad defaults,
+changing defaults and overall slowness.
+
+In particular, at the time I gave up on Rebar, the Cowboy
+test suite was taking about five minutes to run. A quick experiment
+showed I could get much lower times by simply invoking `ct_run`
+directly. On January 4th, 2013, the Cowboy test suite took less
+than a minute to complete.
+
+Following this success I started removing a little more and,
+on the fateful day of January 5th, 2013, removed the dependency
+on Rebar entirely. Rebar, and in particular the concept of
+dependencies, was, and still is, a pretty strong influence.
+
+Erlang.mk was conceived.
+
+A few months passed and, on May 1st, 2013, the Erlang.mk
+repository was created. Erlang.mk was born.
+
+Little did I know how much it would grow.
+
+=== Lifetime of the project
+
+Erlang.mk would eventually become a much larger file able to
+deal with many more projects than just Cowboy. From the birth
+of the project, the biggest force for growth was user contributions,
+because Erlang.mk appealed to a variety of people with different
+needs, needs that Erlang.mk was not fulfilling yet.
+
+The project was split into smaller files focused on a different
+feature each, and a build script was written to build the single
+Erlang.mk file.
+
+A test suite was contributed by a user, and later taken as a basis
+for the current, much more complete test suite. Turns out testing
+a Makefile is pretty straightforward.
+
+A package index was added to solve the problem of discovering
+Erlang projects.
+
+After trying to see if Erlang build tools could cooperate, the
+decision was made to improve compatibility with existing Rebar
+projects by patching Rebar out, using Rebar. This feature, called
+autopatch, proved very successful and made Erlang.mk compatible
+with more than 90% of all Erlang projects.
+
+Erlang.mk documentation was much improved and the Erlang.mk website
+was created in the summer of 2015.
+
+Over the year of 2015, Erlang.mk went from curiosity to a serious
+alternative to other Erlang build tools. The user base increased
+immensely and large projects started using it, including RabbitMQ
+from the 3.6.0 release onward.
+
+A bright future lies ahead.
diff --git a/docs/en/erlang.mk/1/guide/history/index.html b/docs/en/erlang.mk/1/guide/history/index.html
new file mode 100644
index 00000000..cffc5f93
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/history/index.html
@@ -0,0 +1,191 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Short history</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Short history</span></h1>
+
+<div class="paragraph"><p>This chapter aims to be a brief record of the life of the
+Erlang.mk project.</p></div>
+<div class="sect1">
+<h2 id="_before_erlang_mk">Before Erlang.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk originates from the Cowboy project. Cowboy started
+as a Rebar project and I, Loïc Hoguin, was very happy with it
+for a couple years. Over time however I started getting annoyed
+and frustrated by a number of things, including bad defaults,
+changing defaults and overall slowness.</p></div>
+<div class="paragraph"><p>In particular, at the time I gave up on Rebar, the Cowboy
+test suite was taking about five minutes to run. A quick experiment
+showed I could get much lower times by simply invoking <code>ct_run</code>
+directly. On January 4th, 2013, the Cowboy test suite took less
+than a minute to complete.</p></div>
+<div class="paragraph"><p>Following this success I started removing a little more and,
+on the fateful day of January 5th, 2013, removed the dependency
+on Rebar entirely. Rebar, and in particular the concept of
+dependencies, was, and still is, a pretty strong influence.</p></div>
+<div class="paragraph"><p>Erlang.mk was conceived.</p></div>
+<div class="paragraph"><p>A few months passed and, on May 1st, 2013, the Erlang.mk
+repository was created. Erlang.mk was born.</p></div>
+<div class="paragraph"><p>Little did I know how much it would grow.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_lifetime_of_the_project">Lifetime of the project</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk would eventually become a much larger file able to
+deal with many more projects than just Cowboy. From the birth
+of the project, the biggest force for growth was user contributions,
+because Erlang.mk appealed to a variety of people with different
+needs, needs that Erlang.mk was not fulfilling yet.</p></div>
+<div class="paragraph"><p>The project was split into smaller files focused on a different
+feature each, and a build script was written to build the single
+Erlang.mk file.</p></div>
+<div class="paragraph"><p>A test suite was contributed by a user, and later taken as a basis
+for the current, much more complete test suite. Turns out testing
+a Makefile is pretty straightforward.</p></div>
+<div class="paragraph"><p>A package index was added to solve the problem of discovering
+Erlang projects.</p></div>
+<div class="paragraph"><p>After trying to see if Erlang build tools could cooperate, the
+decision was made to improve compatibility with existing Rebar
+projects by patching Rebar out, using Rebar. This feature, called
+autopatch, proved very successful and made Erlang.mk compatible
+with more than 90% of all Erlang projects.</p></div>
+<div class="paragraph"><p>Erlang.mk documentation was much improved and the Erlang.mk website
+was created in the summer of 2015.</p></div>
+<div class="paragraph"><p>Over the year of 2015, Erlang.mk went from curiosity to a serious
+alternative to other Erlang build tools. The user base increased
+immensely and large projects started using it, including RabbitMQ
+from the 3.6.0 release onward.</p></div>
+<div class="paragraph"><p>A bright future lies ahead.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/index.html b/docs/en/erlang.mk/1/guide/index.html
new file mode 100644
index 00000000..f175edf1
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/index.html
@@ -0,0 +1,298 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Erlang.mk User Guide</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Erlang.mk User Guide</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="installation/">Installation</a>
+</p>
+</li>
+<li>
+<p>
+<a href="getting_started/">Getting started</a>
+</p>
+</li>
+<li>
+<p>
+<a href="overview/">Overview</a>
+</p>
+</li>
+<li>
+<p>
+<a href="updating/">Updating Erlang.mk</a>
+</p>
+</li>
+<li>
+<p>
+<a href="limitations/">Limitations</a>
+</p>
+</li>
+</ul></div>
+<div class="sect1">
+<h2 id="code">Code</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="app/">Building</a>
+</p>
+</li>
+<li>
+<p>
+<a href="deps/">Packages and dependencies</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ports/">NIFs and port drivers</a>
+</p>
+</li>
+<li>
+<p>
+<a href="releases/">Releases</a>
+</p>
+</li>
+<li>
+<p>
+<a href="escripts/">Escripts</a>
+</p>
+</li>
+<li>
+<p>
+<a href="compat/">Compatibility with other build tools</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="docs">Documentation</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="asciidoc/">Asciidoc documentation</a>
+</p>
+</li>
+<li>
+<p>
+<a href="edoc/">EDoc comments</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="tests">Tests</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="shell/">Erlang shell</a>
+</p>
+</li>
+<li>
+<p>
+<a href="eunit/">EUnit</a>
+</p>
+</li>
+<li>
+<p>
+<a href="common_test/">Common Test</a>
+</p>
+</li>
+<li>
+<p>
+<a href="coverage/">Code coverage</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ci/">Continuous integration</a>
+</p>
+</li>
+<li>
+<p>
+<a href="dialyzer/">Dialyzer</a>
+</p>
+</li>
+<li>
+<p>
+<a href="xref/">Xref</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="plugins">Third-party plugins</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="external_plugins/">External plugins</a>
+</p>
+</li>
+<li>
+<p>
+<a href="external_plugins_list/">List of plugins</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="about">About Erlang.mk</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="why/">Why erlang.mk?</a>
+</p>
+</li>
+<li>
+<p>
+<a href="history/">Short history</a>
+</p>
+</li>
+<li>
+<p>
+<a href="contributing/">Contributing</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/installation.asciidoc b/docs/en/erlang.mk/1/guide/installation.asciidoc
new file mode 100644
index 00000000..cc18e7f1
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/installation.asciidoc
@@ -0,0 +1,124 @@
+[[installation]]
+== Installation
+
+This chapter explains how to setup your system in
+order to use Erlang.mk.
+
+=== On Unix
+
+Erlang.mk requires GNU Make to be installed. GNU Make 3.81
+or later is required. GNU Make 4.1 or later is recommended,
+as this is the version Erlang.mk is developed on.
+
+Some functionality requires that Autoconf 2.59 or later be
+installed, in order to compile Erlang/OTP. Erlang/OTP may
+have further requirements depending on your needs.
+
+Erlang.mk currently requires Erlang/OTP to be installed in
+order to compile Erlang projects.
+
+Some packages may require additional libraries.
+
+=== On Windows
+
+Erlang.mk can be used on Windows inside an MSYS2 environment.
+Cygwin, MSYS (the original) and native Windows (both Batch
+and PowerShell) are currently not supported.
+
+The rest of this section details how to setup Erlang/OTP and
+MSYS2 in order to use Erlang.mk.
+
+==== Installing Erlang/OTP
+
+Erlang.mk requires Erlang/OTP to be installed. The OTP team
+provides binaries of Erlang/OTP for all major and minor releases,
+available from the http://www.erlang.org/download.html[official download page].
+It is recommended that you use the 64-bit installer unless
+technically impossible. Please follow the instructions from
+the installer to complete the installation.
+
+The OTP team also provides a short guide to
+http://www.erlang.org/download.html[installing Erlang/OTP on Windows]
+if you need additional references.
+
+You can install Erlang/OTP silently using the `/S` switch
+on the command line:
+
+----
+C:\Users\essen\Downloads> otp_win64_18.0.exe /S
+----
+
+==== Installing MSYS2
+
+The only supported environment on Windows is MSYS2. MSYS2 is
+a lightweight Unix-like environment for Windows that comes
+with the Arch Linux package manager, `pacman`.
+
+The MSYS2 project provides a http://msys2.github.io[one click installer]
+and instructions to set things up post-installation.
+
+It is currently not possible to use the installer silently.
+Thankfully, the MSYS2 project provides an archive that can
+be used in lieu of the installer. The archive however requires
+_7zip_ to decompress it.
+
+First, download the
+http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20150512.tar.xz/download[MSYS2 base archive]
+and extract it under 'C:\'. Assuming you downloaded the
+archive as 'msys2.tar.xz' and put it in 'C:\', you can
+use the following commands to extract it:
+
+----
+C:\> 7z x msys2.tar.xz
+C:\> 7z x msys2.tar > NUL
+----
+
+Then you can run the two commands needed to perform the
+post-installation setup:
+
+----
+C:\> C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime"
+C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"
+----
+
+==== Installing the required MSYS2 packages
+
+After following these instructions, you can install GNU Make,
+Git and any other required softwares. From an MSYS2 shell,
+you can call `pacman` directly:
+
+[source,bash]
+$ pacman -S git make
+
+You can use `pacman -Ss` to search packages. For example,
+to find all packages related to GCC:
+
+[source,bash]
+$ pacman -Ss gcc
+
+If you are going to compile C/C++ code, you will need to
+install this package, as Erlang.mk cannot use the normal
+"gcc" package:
+
+[source,bash]
+$ pacman -S mingw-w64-x86_64-gcc
+
+You can also run commands under the MSYS2 environment from
+the Windows command line or batch files. This command will
+install GNU Make and Git:
+
+----
+C:\> C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"
+----
+
+You can use similar `bash` commands if you need to run programs
+inside the MSYS2 environment from a batch file.
+
+==== Gotchas
+
+While most of the basic functionality will just work, there are
+still some issues. Erlang.mk needs to be fixed to pass the
+right paths when running Erlang scripts. We are working on it.
+Erlang.mk is fully tested on both Linux and Windows, but is
+lacking tests in the areas not yet covered by this guide,
+so expect bugs to be fixed as more tests are added.
diff --git a/docs/en/erlang.mk/1/guide/installation/index.html b/docs/en/erlang.mk/1/guide/installation/index.html
new file mode 100644
index 00000000..3eebaa95
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/installation/index.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Installation</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Installation</span></h1>
+
+<div class="paragraph"><p>This chapter explains how to setup your system in
+order to use Erlang.mk.</p></div>
+<div class="sect1">
+<h2 id="_on_unix">On Unix</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk requires GNU Make to be installed. GNU Make 3.81
+or later is required. GNU Make 4.1 or later is recommended,
+as this is the version Erlang.mk is developed on.</p></div>
+<div class="paragraph"><p>Some functionality requires that Autoconf 2.59 or later be
+installed, in order to compile Erlang/OTP. Erlang/OTP may
+have further requirements depending on your needs.</p></div>
+<div class="paragraph"><p>Erlang.mk currently requires Erlang/OTP to be installed in
+order to compile Erlang projects.</p></div>
+<div class="paragraph"><p>Some packages may require additional libraries.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_on_windows">On Windows</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk can be used on Windows inside an MSYS2 environment.
+Cygwin, MSYS (the original) and native Windows (both Batch
+and PowerShell) are currently not supported.</p></div>
+<div class="paragraph"><p>The rest of this section details how to setup Erlang/OTP and
+MSYS2 in order to use Erlang.mk.</p></div>
+<div class="sect3">
+<h4 id="_installing_erlang_otp">Installing Erlang/OTP</h4>
+<div class="paragraph"><p>Erlang.mk requires Erlang/OTP to be installed. The OTP team
+provides binaries of Erlang/OTP for all major and minor releases,
+available from the <a href="http://www.erlang.org/download.html">official download page</a>.
+It is recommended that you use the 64-bit installer unless
+technically impossible. Please follow the instructions from
+the installer to complete the installation.</p></div>
+<div class="paragraph"><p>The OTP team also provides a short guide to
+<a href="http://www.erlang.org/download.html">installing Erlang/OTP on Windows</a>
+if you need additional references.</p></div>
+<div class="paragraph"><p>You can install Erlang/OTP silently using the <code>/S</code> switch
+on the command line:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>C:\Users\essen\Downloads&gt; otp_win64_18.0.exe /S</code></pre>
+</div></div>
+</div>
+<div class="sect3">
+<h4 id="_installing_msys2">Installing MSYS2</h4>
+<div class="paragraph"><p>The only supported environment on Windows is MSYS2. MSYS2 is
+a lightweight Unix-like environment for Windows that comes
+with the Arch Linux package manager, <code>pacman</code>.</p></div>
+<div class="paragraph"><p>The MSYS2 project provides a <a href="http://msys2.github.io">one click installer</a>
+and instructions to set things up post-installation.</p></div>
+<div class="paragraph"><p>It is currently not possible to use the installer silently.
+Thankfully, the MSYS2 project provides an archive that can
+be used in lieu of the installer. The archive however requires
+<em>7zip</em> to decompress it.</p></div>
+<div class="paragraph"><p>First, download the
+<a href="http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20150512.tar.xz/download">MSYS2 base archive</a>
+and extract it under <em>C:\</em>. Assuming you downloaded the
+archive as <em>msys2.tar.xz</em> and put it in <em>C:\</em>, you can
+use the following commands to extract it:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>C:\&gt; 7z x msys2.tar.xz
+C:\&gt; 7z x msys2.tar &gt; NUL</code></pre>
+</div></div>
+<div class="paragraph"><p>Then you can run the two commands needed to perform the
+post-installation setup:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy bash pacman pacman-mirrors msys2-runtime"
+C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"</code></pre>
+</div></div>
+</div>
+<div class="sect3">
+<h4 id="_installing_the_required_msys2_packages">Installing the required MSYS2 packages</h4>
+<div class="paragraph"><p>After following these instructions, you can install GNU Make,
+Git and any other required softwares. From an MSYS2 shell,
+you can call <code>pacman</code> directly:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ pacman -S git make</tt></pre></div></div>
+<div class="paragraph"><p>You can use <code>pacman -Ss</code> to search packages. For example,
+to find all packages related to GCC:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ pacman -Ss gcc</tt></pre></div></div>
+<div class="paragraph"><p>If you are going to compile C/C++ code, you will need to
+install this package, as Erlang.mk cannot use the normal
+"gcc" package:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ pacman -S mingw-w<span style="color: #993399">64</span>-x86_64-gcc</tt></pre></div></div>
+<div class="paragraph"><p>You can also run commands under the MSYS2 environment from
+the Windows command line or batch files. This command will
+install GNU Make and Git:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>C:\&gt; C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S git make"</code></pre>
+</div></div>
+<div class="paragraph"><p>You can use similar <code>bash</code> commands if you need to run programs
+inside the MSYS2 environment from a batch file.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_gotchas">Gotchas</h4>
+<div class="paragraph"><p>While most of the basic functionality will just work, there are
+still some issues. Erlang.mk needs to be fixed to pass the
+right paths when running Erlang scripts. We are working on it.
+Erlang.mk is fully tested on both Linux and Windows, but is
+lacking tests in the areas not yet covered by this guide,
+so expect bugs to be fixed as more tests are added.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/limitations.asciidoc b/docs/en/erlang.mk/1/guide/limitations.asciidoc
new file mode 100644
index 00000000..1bf33d21
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/limitations.asciidoc
@@ -0,0 +1,46 @@
+[[limitations]]
+== Limitations
+
+No software is perfect.
+
+It's very important, when evaluating and when using a tool,
+to understand its limitations, so as to avoid making mistakes
+and wasting valuable time.
+
+This chapter lists all known limitations of Erlang.mk.
+
+=== Erlang must be available
+
+Currently Erlang.mk requires you to install Erlang beforehand.
+Installing Erlang is not always easy, particularly if you need
+a specific version of Erlang for a specific project.
+
+In addition, the Erlang being used must be in your `$PATH`
+before you use Erlang.mk.
+
+In the future we envision, Erlang.mk could manage the Erlang
+version you need to use a project. Erlang.mk already does this
+for running tests when using `make ci`, so doing this during
+development is just a step away.
+
+=== Spaces in path
+
+Erlang.mk will currently not work properly if the path to the
+project contains spaces. To check if that is the case, use the
+command `pwd`.
+
+This issue is due to how Makefiles work. There might be ways
+to solve it, we have not given up on it, but it's very low
+priority considering how simple the workaround is.
+
+=== Dependency tracking and modification times
+
+Erlang source files that depend on other files will have their
+modification time updated when they need to be recompiled due
+to a dependency having changed. This could cause some editors to
+think the file changed when it didn't.
+
+Erlang.mk must use this method in order to be able to compile
+files in one `erlc` invocation. The benefits greatly outweigh
+the issue in this case and so there are currently no plans to
+fix this behavior.
diff --git a/docs/en/erlang.mk/1/guide/limitations/index.html b/docs/en/erlang.mk/1/guide/limitations/index.html
new file mode 100644
index 00000000..85b72139
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/limitations/index.html
@@ -0,0 +1,179 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Limitations</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Limitations</span></h1>
+
+<div class="paragraph"><p>No software is perfect.</p></div>
+<div class="paragraph"><p>It&#8217;s very important, when evaluating and when using a tool,
+to understand its limitations, so as to avoid making mistakes
+and wasting valuable time.</p></div>
+<div class="paragraph"><p>This chapter lists all known limitations of Erlang.mk.</p></div>
+<div class="sect1">
+<h2 id="_erlang_must_be_available">Erlang must be available</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Currently Erlang.mk requires you to install Erlang beforehand.
+Installing Erlang is not always easy, particularly if you need
+a specific version of Erlang for a specific project.</p></div>
+<div class="paragraph"><p>In addition, the Erlang being used must be in your <code>$PATH</code>
+before you use Erlang.mk.</p></div>
+<div class="paragraph"><p>In the future we envision, Erlang.mk could manage the Erlang
+version you need to use a project. Erlang.mk already does this
+for running tests when using <code>make ci</code>, so doing this during
+development is just a step away.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_spaces_in_path">Spaces in path</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk will currently not work properly if the path to the
+project contains spaces. To check if that is the case, use the
+command <code>pwd</code>.</p></div>
+<div class="paragraph"><p>This issue is due to how Makefiles work. There might be ways
+to solve it, we have not given up on it, but it&#8217;s very low
+priority considering how simple the workaround is.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependency_tracking_and_modification_times">Dependency tracking and modification times</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang source files that depend on other files will have their
+modification time updated when they need to be recompiled due
+to a dependency having changed. This could cause some editors to
+think the file changed when it didn&#8217;t.</p></div>
+<div class="paragraph"><p>Erlang.mk must use this method in order to be able to compile
+files in one <code>erlc</code> invocation. The benefits greatly outweigh
+the issue in this case and so there are currently no plans to
+fix this behavior.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/overview.asciidoc b/docs/en/erlang.mk/1/guide/overview.asciidoc
new file mode 100644
index 00000000..8fa57fe4
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/overview.asciidoc
@@ -0,0 +1,87 @@
+[[overview]]
+== Overview
+
+Now that you know how to get started, let's take a look at
+what Erlang.mk can do for you.
+
+=== Building your project
+
+Erlang.mk is first and foremost a build tool. It is especially
+tailored for Erlang developers and follows widely accepted
+practices in the Erlang community.
+
+Erlang.mk will happily build all xref:building[Erlang-specific files]
+you throw at it. Other kinds of files too, like C or C++ code
+when you are working on xref:ports[a NIF or a port driver].
+
+Erlang.mk embraces the concept of xref:deps[source dependencies].
+It can fetch dependency source code using a variety of mechanisms,
+including fetching from Git, Mercurial or SVN.
+
+Erlang.mk will automatically xref:relx[generate releases]
+when applicable. It can also xref:escript[generate escripts].
+
+=== Exploring the package index
+
+Erlang.mk comes with a xref:deps[built-in package index].
+It is built as an extension of the dependency system and is
+meant to be used for discovery purposes.
+
+No package is ever installed, they are only used as dependencies
+and are always project-specific. They can be thought of as a
+shortcut over plain dependencies.
+
+You can get a list of all packages known to Erlang.mk by using
+the `search` target:
+
+[source,bash]
+$ make search
+
+You can also use this target to search across all packages, for
+example to find all packages related to Cowboy:
+
+[source,bash]
+$ make search q=cowboy
+
+=== Generating documentation
+
+Erlang.mk supports _EDoc_ and _Asciidoc_.
+
+xref:edoc[EDoc] generates HTML documentation directly from
+your source code.
+
+While it is convenient, ask yourself: if all the documentation is
+inside the source code, why not just open the source code directly?
+That's where _Asciidoc_ comes in.
+
+The xref:asciidoc[Asciidoc] plugin expects all documentation
+to be separate from source. It will generate HTML, PDF, man pages and
+more from the documentation you write in the 'doc/src/' folder in
+your repository.
+
+=== Running tests
+
+Erlang.mk supports a lot of different testing and static
+analysis tools.
+
+The xref:shell[make shell] command allows you
+to test your project manually. You can automate these
+unit tests with xref:eunit[EUnit] and test
+your entire system with xref:ct[Common Test].
+xref:coverage[Code coverage] can of course
+be enabled during tests.
+
+Erlang.mk comes with features to make your life easier when
+setting up and using xref:ci[Continuous integration].
+
+On the static analysis side of things, Erlang.mk comes with
+support for xref:dialyzer[Dialyzer] and xref:xref[Xref],
+to perform success typing analysis and cross referencing
+of the code.
+
+=== Need more?
+
+Not convinced yet? You can read about xref:why[why you should use Erlang.mk]
+and its xref:history[history]. And if you're still not
+convinced after that, it's OK! The world would be boring if
+everyone agreed on everything all the time.
diff --git a/docs/en/erlang.mk/1/guide/overview/index.html b/docs/en/erlang.mk/1/guide/overview/index.html
new file mode 100644
index 00000000..428db1c3
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/overview/index.html
@@ -0,0 +1,224 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Overview</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Overview</span></h1>
+
+<div class="paragraph"><p>Now that you know how to get started, let&#8217;s take a look at
+what Erlang.mk can do for you.</p></div>
+<div class="sect1">
+<h2 id="_building_your_project">Building your project</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk is first and foremost a build tool. It is especially
+tailored for Erlang developers and follows widely accepted
+practices in the Erlang community.</p></div>
+<div class="paragraph"><p>Erlang.mk will happily build all <a href="../building">Erlang-specific files</a>
+you throw at it. Other kinds of files too, like C or C++ code
+when you are working on <a href="../ports">a NIF or a port driver</a>.</p></div>
+<div class="paragraph"><p>Erlang.mk embraces the concept of <a href="../deps">source dependencies</a>.
+It can fetch dependency source code using a variety of mechanisms,
+including fetching from Git, Mercurial or SVN.</p></div>
+<div class="paragraph"><p>Erlang.mk will automatically <a href="../relx">generate releases</a>
+when applicable. It can also <a href="../escript">generate escripts</a>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exploring_the_package_index">Exploring the package index</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk comes with a <a href="../deps">built-in package index</a>.
+It is built as an extension of the dependency system and is
+meant to be used for discovery purposes.</p></div>
+<div class="paragraph"><p>No package is ever installed, they are only used as dependencies
+and are always project-specific. They can be thought of as a
+shortcut over plain dependencies.</p></div>
+<div class="paragraph"><p>You can get a list of all packages known to Erlang.mk by using
+the <code>search</code> target:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make search</tt></pre></div></div>
+<div class="paragraph"><p>You can also use this target to search across all packages, for
+example to find all packages related to Cowboy:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make search <span style="color: #009900">q</span><span style="color: #990000">=</span>cowboy</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_generating_documentation">Generating documentation</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk supports <em>EDoc</em> and <em>Asciidoc</em>.</p></div>
+<div class="paragraph"><p><a href="../edoc">EDoc</a> generates HTML documentation directly from
+your source code.</p></div>
+<div class="paragraph"><p>While it is convenient, ask yourself: if all the documentation is
+inside the source code, why not just open the source code directly?
+That&#8217;s where <em>Asciidoc</em> comes in.</p></div>
+<div class="paragraph"><p>The <a href="../asciidoc">Asciidoc</a> plugin expects all documentation
+to be separate from source. It will generate HTML, PDF, man pages and
+more from the documentation you write in the <em>doc/src/</em> folder in
+your repository.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running_tests">Running tests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk supports a lot of different testing and static
+analysis tools.</p></div>
+<div class="paragraph"><p>The <a href="../shell">make shell</a> command allows you
+to test your project manually. You can automate these
+unit tests with <a href="../eunit">EUnit</a> and test
+your entire system with <a href="../ct">Common Test</a>.
+<a href="../coverage">Code coverage</a> can of course
+be enabled during tests.</p></div>
+<div class="paragraph"><p>Erlang.mk comes with features to make your life easier when
+setting up and using <a href="../ci">Continuous integration</a>.</p></div>
+<div class="paragraph"><p>On the static analysis side of things, Erlang.mk comes with
+support for <a href="../dialyzer">Dialyzer</a> and <a href="#xref">Xref</a>,
+to perform success typing analysis and cross referencing
+of the code.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_need_more">Need more?</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Not convinced yet? You can read about <a href="../why">why you should use Erlang.mk</a>
+and its <a href="../history">history</a>. And if you&#8217;re still not
+convinced after that, it&#8217;s OK! The world would be boring if
+everyone agreed on everything all the time.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/ports.asciidoc b/docs/en/erlang.mk/1/guide/ports.asciidoc
new file mode 100644
index 00000000..02c636fd
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/ports.asciidoc
@@ -0,0 +1,100 @@
+[[ports]]
+== NIFs and port drivers
+
+Erlang.mk can not only build Erlang projects, but also the C code
+that some projects come with, like NIFs and port drivers.
+
+There are two ways to build the C code: using a custom Makefile,
+or making Erlang.mk do it directly. The C code will be built
+as needed when you run `make`.
+
+// @todo something for easier bootstrapping
+
+=== C source code location and Erlang environment
+
+The C source code should be located in the '$(C_SRC_DIR)' directory.
+It defaults to 'c_src/'. Should you need to modify it, all you
+need to do is to set the variable in your Makefile before including
+Erlang.mk:
+
+[source,make]
+C_SRC_DIR = $(CURDIR)/my_nif_source
+
+When this directory exists, Erlang.mk will automatically create a
+file named '$(C_SRC_ENV)'. This file defaults to '$(C_SRC_DIR)/env.mk'.
+This can also be changed:
+
+[source,make]
+C_SRC_ENV = $(C_SRC_DIR)/erlang_env.mk
+
+It contains a few variable definitions for the environment used for the build:
+
+`ERTS_INCLUDE_DIR`::
+ Path to the ERTS include files ('erl_driver.h', 'erl_nif.h' and more).
+`ERL_INTERFACE_INCLUDE_DIR`::
+ Path to the Erl_Interface include files ('ei.h' and related).
+`ERL_INTERFACE_LIB_DIR`::
+ Path to the Erl_Interface static libraries.
+
+=== Using a custom Makefile
+
+Erlang.mk will automatically run `make` if it detects a Makefile
+in '$(C_SRC_DIR)/Makefile'.
+
+The Makefile should have at least two targets: a default target
+(which can be anything, for example `all`) which is invoked when
+building the C code, and a `clean` target invoked when cleaning
+it.
+
+You can include the 'env.mk' file to benefit from the Erlang
+environment detection:
+
+[source,make]
+include env.mk
+
+=== Using Erlang.mk directly
+
+You don't need to write a Makefile to build C source code, however.
+Erlang.mk comes with rules to build both shared libraries and
+executables, using the source files it finds in '$(C_SRC_DIR)'.
+
+By default, Erlang.mk will create a shared library. To change
+this and create an executable instead, put this in your Makefile
+before including Erlang.mk:
+
+[source,make]
+C_SRC_TYPE = executable
+
+The generated file name varies depending on the type of project
+you have (shared library or executable) and on the platform you
+build the project on.
+
+For shared libraries, the generated file name will be
+'$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION)', with the default
+being '$(CURDIR)/priv/$(PROJECT)' followed by the extension:
+`.dll` on Windows, `.so` everywhere else.
+
+For executables, the generated file name is
+'$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION)', with the same
+default except for the extension: `.exe` on Windows, and otherwise
+nothing.
+
+Erlang.mk sets appropriate compile and linker flags by default.
+These flags vary depending on the platform, and can of course
+be overriden.
+
+`CC`::
+ The compiler to be used.
+`CFLAGS`::
+ C compiler flags.
+`CXXFLAGS`::
+ C++ compiler flags.
+`LDFLAGS`::
+ Linker flags.
+`LDLIBS`::
+ Libraries to link against.
+
+The source files are automatically gathered from the contents
+of '$(C_SRC_DIR)'. Erlang.mk looks for '.c', '.C', '.cc' and '.cpp'
+source files. You can define the variable `SOURCES` to manually
+list the files to compile.
diff --git a/docs/en/erlang.mk/1/guide/ports/index.html b/docs/en/erlang.mk/1/guide/ports/index.html
new file mode 100644
index 00000000..8a9a9066
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/ports/index.html
@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: NIFs and port drivers</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>NIFs and port drivers</span></h1>
+
+<div class="paragraph"><p>Erlang.mk can not only build Erlang projects, but also the C code
+that some projects come with, like NIFs and port drivers.</p></div>
+<div class="paragraph"><p>There are two ways to build the C code: using a custom Makefile,
+or making Erlang.mk do it directly. The C code will be built
+as needed when you run <code>make</code>.</p></div>
+<div class="sect1">
+<h2 id="_c_source_code_location_and_erlang_environment">C source code location and Erlang environment</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The C source code should be located in the <em>$(C_SRC_DIR)</em> directory.
+It defaults to <em>c_src/</em>. Should you need to modify it, all you
+need to do is to set the variable in your Makefile before including
+Erlang.mk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">C_SRC_DIR =</span> <span style="color: #009900">$(CURDIR)</span>/my_nif_source</tt></pre></div></div>
+<div class="paragraph"><p>When this directory exists, Erlang.mk will automatically create a
+file named <em>$(C_SRC_ENV)</em>. This file defaults to <em>$(C_SRC_DIR)/env.mk</em>.
+This can also be changed:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">C_SRC_ENV =</span> <span style="color: #009900">$(C_SRC_DIR)</span>/erlang_env.mk</tt></pre></div></div>
+<div class="paragraph"><p>It contains a few variable definitions for the environment used for the build:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<code>ERTS_INCLUDE_DIR</code>
+</dt>
+<dd>
+<p>
+ Path to the ERTS include files (<em>erl_driver.h</em>, <em>erl_nif.h</em> and more).
+</p>
+</dd>
+<dt class="hdlist1">
+<code>ERL_INTERFACE_INCLUDE_DIR</code>
+</dt>
+<dd>
+<p>
+ Path to the Erl_Interface include files (<em>ei.h</em> and related).
+</p>
+</dd>
+<dt class="hdlist1">
+<code>ERL_INTERFACE_LIB_DIR</code>
+</dt>
+<dd>
+<p>
+ Path to the Erl_Interface static libraries.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_a_custom_makefile">Using a custom Makefile</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk will automatically run <code>make</code> if it detects a Makefile
+in <em>$(C_SRC_DIR)/Makefile</em>.</p></div>
+<div class="paragraph"><p>The Makefile should have at least two targets: a default target
+(which can be anything, for example <code>all</code>) which is invoked when
+building the C code, and a <code>clean</code> target invoked when cleaning
+it.</p></div>
+<div class="paragraph"><p>You can include the <em>env.mk</em> file to benefit from the Erlang
+environment detection:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>include env.mk</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_erlang_mk_directly">Using Erlang.mk directly</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You don&#8217;t need to write a Makefile to build C source code, however.
+Erlang.mk comes with rules to build both shared libraries and
+executables, using the source files it finds in <em>$(C_SRC_DIR)</em>.</p></div>
+<div class="paragraph"><p>By default, Erlang.mk will create a shared library. To change
+this and create an executable instead, put this in your Makefile
+before including Erlang.mk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">C_SRC_TYPE =</span> executable</tt></pre></div></div>
+<div class="paragraph"><p>The generated file name varies depending on the type of project
+you have (shared library or executable) and on the platform you
+build the project on.</p></div>
+<div class="paragraph"><p>For shared libraries, the generated file name will be
+<em>$(C_SRC_OUTPUT)$(C_SRC_SHARED_EXTENSION)</em>, with the default
+being <em>$(CURDIR)/priv/$(PROJECT)</em> followed by the extension:
+<code>.dll</code> on Windows, <code>.so</code> everywhere else.</p></div>
+<div class="paragraph"><p>For executables, the generated file name is
+<em>$(C_SRC_OUTPUT)$(C_SRC_EXECUTABLE_EXTENSION)</em>, with the same
+default except for the extension: <code>.exe</code> on Windows, and otherwise
+nothing.</p></div>
+<div class="paragraph"><p>Erlang.mk sets appropriate compile and linker flags by default.
+These flags vary depending on the platform, and can of course
+be overriden.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<code>CC</code>
+</dt>
+<dd>
+<p>
+ The compiler to be used.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>CFLAGS</code>
+</dt>
+<dd>
+<p>
+ C compiler flags.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>CXXFLAGS</code>
+</dt>
+<dd>
+<p>
+ C++ compiler flags.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>LDFLAGS</code>
+</dt>
+<dd>
+<p>
+ Linker flags.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>LDLIBS</code>
+</dt>
+<dd>
+<p>
+ Libraries to link against.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>The source files are automatically gathered from the contents
+of <em>$(C_SRC_DIR)</em>. Erlang.mk looks for <em>.c</em>, <em>.C</em>, <em>.cc</em> and <em>.cpp</em>
+source files. You can define the variable <code>SOURCES</code> to manually
+list the files to compile.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/releases.asciidoc b/docs/en/erlang.mk/1/guide/releases.asciidoc
new file mode 100644
index 00000000..46183e63
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/releases.asciidoc
@@ -0,0 +1,70 @@
+[[relx]]
+== Releases
+
+Erlang.mk relies on _Relx_ for generating releases. This
+chapter covers the Erlang.mk-specific bits. Consult the
+https://erlware.github.io/relx/[Relx website] for more information.
+
+=== Setup
+
+Erlang.mk will create a release if it detects a Relx configuration
+file in the '$(RELX_CONFIG)' location. This defaults to
+'$(CURDIR)/relx.config'. You can override it by defining
+the variable before including Erlang.mk:
+
+[source,make]
+RELX_CONFIG = $(CURDIR)/webchat.config
+
+Relx does not need to be installed. Erlang.mk will download
+and build it automatically.
+// @todo We are going to fetch relx from repository in the future.
+
+The Relx executable will be saved in the '$(RELX)' file. This
+location defaults to '$(CURDIR)/relx' and can be overriden.
+
+// @todo You can use a custom repository by ???
+
+=== Configuration
+
+You can specify additional Relx options using the `RELX_OPTS`
+variable. For example, to enable `dev_mode`:
+
+[source,make]
+RELX_OPTS = -d true
+
+While you can specify the output directory for the release
+in the Relx options directly, Erlang.mk provides a specific
+variable for it: `RELX_OUTPUT_DIR`. It defaults to the '_rel'
+directory. You can also override it:
+
+[source,make]
+RELX_OUTPUT_DIR = /path/to/staging/directory
+
+=== Generating the release
+
+Now that you're all set, all you need to do is generate the
+release. As mentioned before, Erlang.mk will automatically
+generate it when it detects the '$(RELX_CONFIG)' file. This
+means the following command will also build the release:
+
+[source,bash]
+$ make
+
+If you need to generate the release, and only the release,
+the `rel` target can be used:
+
+[source,bash]
+$ make rel
+
+=== Running the release
+
+Erlang.mk provides a convenience function for running the
+release with one simple command:
+
+[source,bash]
+$ make run
+
+This command will also build the project and generate the
+release if they weren't already. It starts the release in
+_console mode_, meaning you will also have a shell ready to
+use to check things as needed.
diff --git a/docs/en/erlang.mk/1/guide/releases/index.html b/docs/en/erlang.mk/1/guide/releases/index.html
new file mode 100644
index 00000000..40022d86
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/releases/index.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Releases</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Releases</span></h1>
+
+<div class="paragraph"><p>Erlang.mk relies on <em>Relx</em> for generating releases. This
+chapter covers the Erlang.mk-specific bits. Consult the
+<a href="https://erlware.github.io/relx/">Relx website</a> for more information.</p></div>
+<div class="sect1">
+<h2 id="_setup">Setup</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk will create a release if it detects a Relx configuration
+file in the <em>$(RELX_CONFIG)</em> location. This defaults to
+<em>$(CURDIR)/relx.config</em>. You can override it by defining
+the variable before including Erlang.mk:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">RELX_CONFIG =</span> <span style="color: #009900">$(CURDIR)</span>/webchat.config</tt></pre></div></div>
+<div class="paragraph"><p>Relx does not need to be installed. Erlang.mk will download
+and build it automatically.</p></div>
+<div class="paragraph"><p>The Relx executable will be saved in the <em>$(RELX)</em> file. This
+location defaults to <em>$(CURDIR)/relx</em> and can be overriden.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can specify additional Relx options using the <code>RELX_OPTS</code>
+variable. For example, to enable <code>dev_mode</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">RELX_OPTS =</span> -d <span style="font-weight: bold"><span style="color: #0000FF">true</span></span></tt></pre></div></div>
+<div class="paragraph"><p>While you can specify the output directory for the release
+in the Relx options directly, Erlang.mk provides a specific
+variable for it: <code>RELX_OUTPUT_DIR</code>. It defaults to the <em>_rel</em>
+directory. You can also override it:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">RELX_OUTPUT_DIR =</span> /path/to/staging/directory</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_generating_the_release">Generating the release</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Now that you&#8217;re all set, all you need to do is generate the
+release. As mentioned before, Erlang.mk will automatically
+generate it when it detects the <em>$(RELX_CONFIG)</em> file. This
+means the following command will also build the release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make</tt></pre></div></div>
+<div class="paragraph"><p>If you need to generate the release, and only the release,
+the <code>rel</code> target can be used:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make rel</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running_the_release">Running the release</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk provides a convenience function for running the
+release with one simple command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make run</tt></pre></div></div>
+<div class="paragraph"><p>This command will also build the project and generate the
+release if they weren&#8217;t already. It starts the release in
+<em>console mode</em>, meaning you will also have a shell ready to
+use to check things as needed.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/shell.asciidoc b/docs/en/erlang.mk/1/guide/shell.asciidoc
new file mode 100644
index 00000000..a5272531
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/shell.asciidoc
@@ -0,0 +1,46 @@
+[[shell]]
+== Erlang shell
+
+Erlang.mk provides a convenient target for starting a shell
+with all the paths set properly to experiment with your code.
+
+=== Configuration
+
+The `SHELL_DEPS` variable can be used to define dependencies
+that are only to be used when the `make shell` command is called.
+For example, if you want to use _kjell_ as your shell:
+
+[source,make]
+SHELL_DEPS = kjell
+
+Dependencies are downloaded and compiled the first time you
+run the `make shell` command.
+
+You can customize the executable used to start the Erlang shell.
+To continue with our example, if you want to use _kjell_ as your
+shell, you also need to change `SHELL_ERL` and point it to the
+`kjell` executable:
+
+[source,make]
+SHELL_ERL = $(DEPS_DIR)/kjell/bin/kjell
+
+You can specify additional options to be used when starting the
+shell using the `SHELL_OPTS` variable:
+
+[source,make]
+SHELL_OPTS = -setcookie chocolate
+
+Any of the usual `erl` options can be used, including `-eval`:
+
+[source,make]
+SHELL_OPTS = -eval 'my_app:run()'
+
+=== Usage
+
+To start the shell, all you need is the following command:
+
+[source,bash]
+$ make shell
+
+The shell can be stopped as usual with a double Ctrl+C or the
+command `q().`.
diff --git a/docs/en/erlang.mk/1/guide/shell/index.html b/docs/en/erlang.mk/1/guide/shell/index.html
new file mode 100644
index 00000000..ed093c95
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/shell/index.html
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Erlang shell</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Erlang shell</span></h1>
+
+<div class="paragraph"><p>Erlang.mk provides a convenient target for starting a shell
+with all the paths set properly to experiment with your code.</p></div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>SHELL_DEPS</code> variable can be used to define dependencies
+that are only to be used when the <code>make shell</code> command is called.
+For example, if you want to use <em>kjell</em> as your shell:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SHELL_DEPS =</span> kjell</tt></pre></div></div>
+<div class="paragraph"><p>Dependencies are downloaded and compiled the first time you
+run the <code>make shell</code> command.</p></div>
+<div class="paragraph"><p>You can customize the executable used to start the Erlang shell.
+To continue with our example, if you want to use <em>kjell</em> as your
+shell, you also need to change <code>SHELL_ERL</code> and point it to the
+<code>kjell</code> executable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SHELL_ERL =</span> <span style="color: #009900">$(DEPS_DIR)</span>/kjell/bin/kjell</tt></pre></div></div>
+<div class="paragraph"><p>You can specify additional options to be used when starting the
+shell using the <code>SHELL_OPTS</code> variable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SHELL_OPTS =</span> -setcookie chocolate</tt></pre></div></div>
+<div class="paragraph"><p>Any of the usual <code>erl</code> options can be used, including <code>-eval</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">SHELL_OPTS =</span> -eval <span style="color: #FF0000">'my_app:run()'</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_usage">Usage</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To start the shell, all you need is the following command:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make shell</tt></pre></div></div>
+<div class="paragraph"><p>The shell can be stopped as usual with a double Ctrl+C or the
+command <code>q().</code>.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/updating.asciidoc b/docs/en/erlang.mk/1/guide/updating.asciidoc
new file mode 100644
index 00000000..61d913db
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/updating.asciidoc
@@ -0,0 +1,63 @@
+[[updating]]
+== Updating Erlang.mk
+
+This chapter describes how to update the 'erlang.mk' file
+in your repository.
+
+=== Initial bootstrap
+
+The first time you use Erlang.mk, it will bootstrap itself.
+It always uses the most recent version for this, so you don't
+have to update after creating your project.
+
+=== Updating
+
+Later on though, updating becomes a necessity. Erlang.mk
+developers and contributors relentlessly improve the project
+and add new features; it would be a waste not to benefit
+from this.
+
+That's why updating Erlang.mk is so simple. All you need
+to do is to call `make erlang-mk`:
+
+[source,bash]
+----
+$ make erlang-mk
+git clone https://github.com/ninenines/erlang.mk .erlang.mk.build
+Cloning into '.erlang.mk.build'...
+remote: Counting objects: 4035, done.
+remote: Compressing objects: 100% (12/12), done.
+remote: Total 4035 (delta 8), reused 4 (delta 4), pack-reused 4019
+Receiving objects: 100% (4035/4035), 1.10 MiB | 1000.00 KiB/s, done.
+Resolving deltas: 100% (2442/2442), done.
+Checking connectivity... done.
+if [ -f build.config ]; then cp build.config .erlang.mk.build; fi
+cd .erlang.mk.build && make
+make[1]: Entering directory '/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'
+awk 'FNR==1 && NR!=1{print ""}1' core/core.mk index/*.mk core/index.mk core/deps.mk plugins/protobuffs.mk core/erlc.mk core/docs.mk core/test.mk plugins/asciidoc.mk plugins/bootstrap.mk plugins/c_src.mk plugins/ci.mk plugins/ct.mk plugins/dialyzer.mk plugins/edoc.mk plugins/elvis.mk plugins/erlydtl.mk plugins/escript.mk plugins/eunit.mk plugins/relx.mk plugins/shell.mk plugins/triq.mk plugins/xref.mk plugins/cover.mk \
+ | sed 's/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/' > erlang.mk
+make[1]: Leaving directory '/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'
+cp .erlang.mk.build/erlang.mk ./erlang.mk
+rm -rf .erlang.mk.build
+----
+
+All that's left to do is to commit the file!
+
+Yep, it's that easy.
+
+=== Customizing the build
+
+Erlang.mk allows you to customize which plugins are to be included
+in the 'erlang.mk' file. You can do so by maintaining your own
+'build.config' file in your repository. Erlang.mk will automatically
+use it the next time you run `make erlang-mk`.
+
+The 'build.config' file contains the list of all files that will
+be built into the resulting 'erlang.mk' file. You can start from
+the https://github.com/ninenines/erlang.mk/blob/master/build.config[most recent version]
+and customize to your needs.
+
+You can also name the file differently or put it in a separate folder
+by modifying the value for `ERLANG_MK_BUILD_CONFIG`. You can also
+tell Erlang.mk to use a different temporary directory by changing
+the `ERLANG_MK_BUILD_DIR` variable.
diff --git a/docs/en/erlang.mk/1/guide/updating/index.html b/docs/en/erlang.mk/1/guide/updating/index.html
new file mode 100644
index 00000000..d52442fd
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/updating/index.html
@@ -0,0 +1,198 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Updating Erlang.mk</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Updating Erlang.mk</span></h1>
+
+<div class="paragraph"><p>This chapter describes how to update the <em>erlang.mk</em> file
+in your repository.</p></div>
+<div class="sect1">
+<h2 id="_initial_bootstrap">Initial bootstrap</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The first time you use Erlang.mk, it will bootstrap itself.
+It always uses the most recent version for this, so you don&#8217;t
+have to update after creating your project.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_updating">Updating</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Later on though, updating becomes a necessity. Erlang.mk
+developers and contributors relentlessly improve the project
+and add new features; it would be a waste not to benefit
+from this.</p></div>
+<div class="paragraph"><p>That&#8217;s why updating Erlang.mk is so simple. All you need
+to do is to call <code>make erlang-mk</code>:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make erlang-mk
+git clone https<span style="color: #990000">:</span>//github<span style="color: #990000">.</span>com/ninenines/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build
+Cloning into <span style="color: #FF0000">'.erlang.mk.build'</span><span style="color: #990000">...</span>
+remote<span style="color: #990000">:</span> Counting objects<span style="color: #990000">:</span> <span style="color: #993399">4035</span><span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+remote<span style="color: #990000">:</span> Compressing objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">12</span><span style="color: #990000">/</span><span style="color: #993399">12</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+remote<span style="color: #990000">:</span> Total <span style="color: #993399">4035</span> <span style="color: #990000">(</span>delta <span style="color: #993399">8</span><span style="color: #990000">),</span> reused <span style="color: #993399">4</span> <span style="color: #990000">(</span>delta <span style="color: #993399">4</span><span style="color: #990000">),</span> pack-reused <span style="color: #993399">4019</span>
+Receiving objects<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">4035</span><span style="color: #990000">/</span><span style="color: #993399">4035</span><span style="color: #990000">),</span> <span style="color: #993399">1.10</span> MiB <span style="color: #990000">|</span> <span style="color: #993399">1000.00</span> KiB/s<span style="color: #990000">,</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+Resolving deltas<span style="color: #990000">:</span> <span style="color: #993399">100</span><span style="color: #990000">%</span> <span style="color: #990000">(</span><span style="color: #993399">2442</span><span style="color: #990000">/</span><span style="color: #993399">2442</span><span style="color: #990000">),</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+Checking connectivity<span style="color: #990000">...</span> <span style="font-weight: bold"><span style="color: #0000FF">done</span></span><span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #0000FF">if</span></span> <span style="color: #990000">[</span> -f build<span style="color: #990000">.</span>config <span style="color: #990000">];</span> <span style="font-weight: bold"><span style="color: #0000FF">then</span></span> cp build<span style="color: #990000">.</span>config <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build<span style="color: #990000">;</span> <span style="font-weight: bold"><span style="color: #0000FF">fi</span></span>
+cd <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build <span style="color: #990000">&amp;&amp;</span> make
+make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Entering directory <span style="color: #FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</span>
+awk <span style="color: #FF0000">'FNR==1 &amp;&amp; NR!=1{print ""}1'</span> core/core<span style="color: #990000">.</span>mk index<span style="color: #990000">/*.</span>mk core/index<span style="color: #990000">.</span>mk core/deps<span style="color: #990000">.</span>mk plugins/protobuffs<span style="color: #990000">.</span>mk core/erlc<span style="color: #990000">.</span>mk core/docs<span style="color: #990000">.</span>mk core/test<span style="color: #990000">.</span>mk plugins/asciidoc<span style="color: #990000">.</span>mk plugins/bootstrap<span style="color: #990000">.</span>mk plugins/c_src<span style="color: #990000">.</span>mk plugins/ci<span style="color: #990000">.</span>mk plugins/ct<span style="color: #990000">.</span>mk plugins/dialyzer<span style="color: #990000">.</span>mk plugins/edoc<span style="color: #990000">.</span>mk plugins/elvis<span style="color: #990000">.</span>mk plugins/erlydtl<span style="color: #990000">.</span>mk plugins/escript<span style="color: #990000">.</span>mk plugins/eunit<span style="color: #990000">.</span>mk plugins/relx<span style="color: #990000">.</span>mk plugins/shell<span style="color: #990000">.</span>mk plugins/triq<span style="color: #990000">.</span>mk plugins/xref<span style="color: #990000">.</span>mk plugins/cover<span style="color: #990000">.</span>mk <span style="color: #990000">\</span>
+ <span style="color: #990000">|</span> sed <span style="color: #FF0000">'s/^ERLANG_MK_VERSION = .*/ERLANG_MK_VERSION = 1.2.0-642-gccd2b9f/'</span> <span style="color: #990000">&gt;</span> erlang<span style="color: #990000">.</span>mk
+make<span style="color: #990000">[</span><span style="color: #993399">1</span><span style="color: #990000">]:</span> Leaving directory <span style="color: #FF0000">'/home/essen/tmp/emkg/hello_joe/.erlang.mk.build'</span>
+cp <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build/erlang<span style="color: #990000">.</span>mk <span style="color: #990000">.</span>/erlang<span style="color: #990000">.</span>mk
+rm -rf <span style="color: #990000">.</span>erlang<span style="color: #990000">.</span>mk<span style="color: #990000">.</span>build</tt></pre></div></div>
+<div class="paragraph"><p>All that&#8217;s left to do is to commit the file!</p></div>
+<div class="paragraph"><p>Yep, it&#8217;s that easy.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_customizing_the_build">Customizing the build</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk allows you to customize which plugins are to be included
+in the <em>erlang.mk</em> file. You can do so by maintaining your own
+<em>build.config</em> file in your repository. Erlang.mk will automatically
+use it the next time you run <code>make erlang-mk</code>.</p></div>
+<div class="paragraph"><p>The <em>build.config</em> file contains the list of all files that will
+be built into the resulting <em>erlang.mk</em> file. You can start from
+the <a href="https://github.com/ninenines/erlang.mk/blob/master/build.config">most recent version</a>
+and customize to your needs.</p></div>
+<div class="paragraph"><p>You can also name the file differently or put it in a separate folder
+by modifying the value for <code>ERLANG_MK_BUILD_CONFIG</code>. You can also
+tell Erlang.mk to use a different temporary directory by changing
+the <code>ERLANG_MK_BUILD_DIR</code> variable.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/why.asciidoc b/docs/en/erlang.mk/1/guide/why.asciidoc
new file mode 100644
index 00000000..e91b64ca
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/why.asciidoc
@@ -0,0 +1,81 @@
+[[why]]
+== Why Erlang.mk
+
+Why would you choose Erlang.mk, if not for its
+xref:overview[many features]? This chapter will
+attempt to answer that.
+
+=== Erlang.mk is fast
+
+Erlang.mk is as fast as it gets.
+
+Erlang.mk will group the compilation of files so as to avoid
+running the BEAM more than necessary. This saves many seconds
+compared to traditional Makefiles, even on small projects.
+
+Erlang.mk will not try to be too smart. It provides a simple
+solution that works for most people, and gives additional
+options for projects that run into edge cases, often in the
+form of extra variables or rules to be defined.
+
+=== Erlang.mk gives you the full power of Unix
+
+Erlang.mk is a Makefile.
+
+You could use Erlang.mk directly without configuring anything
+and it would just work. But you can also extend it greatly
+either through configuration or hooks, and you can of course
+add your own rules to the Makefile.
+
+In all cases: for configuration, hooks or custom rules, you
+have all the power of Unix at your disposal, and can call
+any utility _or even any language interpreter_ you want,
+every time you need to. Erlang.mk also allows you to write
+scripts in this small language called Erlang directly inside
+your Makefile if you ever need to...
+
+=== Erlang.mk is a text file
+
+Erlang.mk is a Makefile.
+
+Which means Erlang.mk is a simple text file. You can edit a
+text file. Nothing stops you. If you run into any bug, or
+behavior that does not suit you, you can just open the
+'erlang.mk' file in your favorite editor, fix and/or comment
+a few lines, save, and try again. It's as simple as it gets.
+
+Currently using a binary build tool? Good luck with that.
+
+=== Erlang.mk can manage Erlang itself
+
+Erlang.mk isn't written in Erlang.
+
+That's not a good thing, you say? Well, here's one thing
+that Erlang.mk and Makefiles can do for you that Erlang
+build tool can't easily: choose what version of Erlang is
+to be used for compiling the project.
+
+This really is a one-liner in Erlang.mk (a few more lines
+if you also let it download and build Erlang directly)
+and allows for even greater things, like testing your
+project across all supported Erlang versions in one small
+command: `make -k ci`.
+
+=== Erlang.mk can do more than Erlang
+
+Erlang.mk doesn't care what your dependencies are written in.
+
+Erlang.mk will happily compile any dependency, as long as
+they come with a Makefile. The dependency can be written
+in C, C++ or even Javascript... Who cares, really? If you
+need Erlang.mk to fetch it, then Erlang.mk will fetch it
+and compile it as needed.
+
+=== Erlang.mk integrates nicely in Make and Automake projects
+
+If you are planning to put your project in the middle of
+a Make or Automake-based build environment, then the most
+logical thing to do is to use a Makefile.
+
+Erlang.mk will happily sit in such an environment and behave
+as you expect it to.
diff --git a/docs/en/erlang.mk/1/guide/why/index.html b/docs/en/erlang.mk/1/guide/why/index.html
new file mode 100644
index 00000000..845d7867
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/why/index.html
@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Why Erlang.mk</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Why Erlang.mk</span></h1>
+
+<div class="paragraph"><p>Why would you choose Erlang.mk, if not for its
+<a href="../overview">many features</a>? This chapter will
+attempt to answer that.</p></div>
+<div class="sect1">
+<h2 id="_erlang_mk_is_fast">Erlang.mk is fast</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk is as fast as it gets.</p></div>
+<div class="paragraph"><p>Erlang.mk will group the compilation of files so as to avoid
+running the BEAM more than necessary. This saves many seconds
+compared to traditional Makefiles, even on small projects.</p></div>
+<div class="paragraph"><p>Erlang.mk will not try to be too smart. It provides a simple
+solution that works for most people, and gives additional
+options for projects that run into edge cases, often in the
+form of extra variables or rules to be defined.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_gives_you_the_full_power_of_unix">Erlang.mk gives you the full power of Unix</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
+<div class="paragraph"><p>You could use Erlang.mk directly without configuring anything
+and it would just work. But you can also extend it greatly
+either through configuration or hooks, and you can of course
+add your own rules to the Makefile.</p></div>
+<div class="paragraph"><p>In all cases: for configuration, hooks or custom rules, you
+have all the power of Unix at your disposal, and can call
+any utility <em>or even any language interpreter</em> you want,
+every time you need to. Erlang.mk also allows you to write
+scripts in this small language called Erlang directly inside
+your Makefile if you ever need to&#8230;</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_is_a_text_file">Erlang.mk is a text file</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
+<div class="paragraph"><p>Which means Erlang.mk is a simple text file. You can edit a
+text file. Nothing stops you. If you run into any bug, or
+behavior that does not suit you, you can just open the
+<em>erlang.mk</em> file in your favorite editor, fix and/or comment
+a few lines, save, and try again. It&#8217;s as simple as it gets.</p></div>
+<div class="paragraph"><p>Currently using a binary build tool? Good luck with that.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_can_manage_erlang_itself">Erlang.mk can manage Erlang itself</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk isn&#8217;t written in Erlang.</p></div>
+<div class="paragraph"><p>That&#8217;s not a good thing, you say? Well, here&#8217;s one thing
+that Erlang.mk and Makefiles can do for you that Erlang
+build tool can&#8217;t easily: choose what version of Erlang is
+to be used for compiling the project.</p></div>
+<div class="paragraph"><p>This really is a one-liner in Erlang.mk (a few more lines
+if you also let it download and build Erlang directly)
+and allows for even greater things, like testing your
+project across all supported Erlang versions in one small
+command: <code>make -k ci</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_can_do_more_than_erlang">Erlang.mk can do more than Erlang</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk doesn&#8217;t care what your dependencies are written in.</p></div>
+<div class="paragraph"><p>Erlang.mk will happily compile any dependency, as long as
+they come with a Makefile. The dependency can be written
+in C, C++ or even Javascript&#8230; Who cares, really? If you
+need Erlang.mk to fetch it, then Erlang.mk will fetch it
+and compile it as needed.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_erlang_mk_integrates_nicely_in_make_and_automake_projects">Erlang.mk integrates nicely in Make and Automake projects</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you are planning to put your project in the middle of
+a Make or Automake-based build environment, then the most
+logical thing to do is to use a Makefile.</p></div>
+<div class="paragraph"><p>Erlang.mk will happily sit in such an environment and behave
+as you expect it to.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/guide/xref.asciidoc b/docs/en/erlang.mk/1/guide/xref.asciidoc
new file mode 100644
index 00000000..44ed1908
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/xref.asciidoc
@@ -0,0 +1,6 @@
+[[xref]]
+== Xref
+
+// @todo Write it.
+
+Placeholder chapter.
diff --git a/docs/en/erlang.mk/1/guide/xref/index.html b/docs/en/erlang.mk/1/guide/xref/index.html
new file mode 100644
index 00000000..1def98ab
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/xref/index.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Xref</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Xref</span></h1>
+
+<div class="paragraph"><p>Placeholder chapter.</p></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/erlang.mk/1/index.html b/docs/en/erlang.mk/1/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/erlang.mk/1/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/erlang.mk/index.html b/docs/en/erlang.mk/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/erlang.mk/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/gun/1.0/guide/connect.asciidoc b/docs/en/gun/1.0/guide/connect.asciidoc
new file mode 100644
index 00000000..c2e887c1
--- /dev/null
+++ b/docs/en/gun/1.0/guide/connect.asciidoc
@@ -0,0 +1,154 @@
+== Connection
+
+This chapter describes how to open, monitor and close
+a connection using the Gun client.
+
+=== Gun connections
+
+Gun is designed with the SPDY and Websocket protocols in mind.
+They are built for long-running connections that allow concurrent
+exchange of data, either in the form of request/responses for
+SPDY or in the form of messages for Websocket.
+
+A Gun connection is an Erlang process that manages a socket to
+a remote endpoint. This Gun connection is owned by a user
+process that is called the _owner_ of the connection, and is
+managed by the supervision tree of the `gun` application.
+
+The owner process communicates with the Gun connection
+by calling functions from the module `gun`. All functions
+perform their respective operations asynchronously. The Gun
+connection will send Erlang messages to the owner process
+whenever needed.
+
+When the remote endpoint closes the connection, Gun attempts
+to reconnect automatically.
+
+=== Opening a new connection
+
+The `gun:open/{2,3}` function must be used to open a connection.
+
+.Opening a connection to example.org on port 443
+
+[source,erlang]
+{ok, ConnPid} = gun:open("example.org", 443).
+
+If the port given is 443, Gun will attempt to connect using
+SSL. The protocol will be selected automatically using the
+NPN extension for TLS. By default Gun supports SPDY/3.1,
+SPDY/3 and HTTP/1.1 when connecting using SSL.
+
+For any other port, Gun will attempt to connect using TCP
+and will use the HTTP/1.1 protocol.
+
+The transport and protocol used can be overriden using
+options. The manual documents all available options.
+
+Options can be provided as a third argument, and take the
+form of a map.
+
+.Opening an SSL connection to example.org on port 8443
+
+[source,erlang]
+{ok, ConnPid} = gun:open("example.org", 8443, #{transport=>ssl}).
+
+=== Waiting for the connection to be established
+
+When Gun successfully connects to the server, it sends a
+`gun_up` message with the protocol that has been selected
+for the connection.
+
+Gun provides the functions `gun:await_up/{1,2,3}` that wait
+for the `gun_up` message. They can optionally take a monitor
+reference and/or timeout value. If no monitor is provided,
+one will be created for the duration of the function call.
+
+.Synchronous opening of a connection
+
+[source,erlang]
+{ok, ConnPid} = gun:open("example.org", 443),
+{ok, Protocol} = gun:await_up(ConnPid).
+
+=== Handling connection loss
+
+When the connection is lost, Gun will send a `gun_down`
+message indicating the current protocol, the reason the
+connection was lost and two list of stream references.
+
+The first list indicates open streams that _may_ have been
+processed by the server. The second list indicates open
+streams that the server did not process.
+
+=== Monitoring the connection process
+
+@todo Gun should detect the owner process being killed
+
+Because software errors are unavoidable, it is important to
+detect when the Gun process crashes. It is also important
+to detect when it exits normally. Erlang provides two ways
+to do that: links and monitors.
+
+Gun leaves you the choice as to which one will be used.
+However, if you use the `gun:await/{2,3}` or `gun:await_body/{2,3}`
+functions, a monitor may be used for you to avoid getting
+stuck waiting for a message that will never come.
+
+If you choose to monitor yourself you can do it on a permanent
+basis rather than on every message you will receive, saving
+resources. Indeed, the `gun:await/{3,4}` and `gun:await_body/{3,4}`
+functions both accept a monitor argument if you have one already.
+
+.Monitoring the connection process
+
+[source,erlang]
+{ok, ConnPid} = gun:open("example.org", 443).
+MRef = monitor(process, ConnPid).
+
+This monitor reference can be kept and used until the connection
+process exits.
+
+.Handling `DOWN` messages
+
+[source,erlang]
+receive
+ %% Receive Gun messages here...
+ {'DOWN', Mref, process, ConnPid, Reason} ->
+ error_logger:error_msg("Oops!"),
+ exit(Reason);
+end.
+
+What to do when you receive a `DOWN` message is entirely up to you.
+
+=== Closing the connection abruptly
+
+The connection can be stopped abruptly at any time by calling
+the `gun:close/1` function.
+
+.Immediate closing of the connection
+
+[source,erlang]
+gun:close(ConnPid).
+
+The process is stopped immediately without having a chance to
+perform the protocol's closing handshake, if any.
+
+=== Closing the connection gracefully
+
+The connection can also be stopped gracefully by calling the
+`gun:shutdown/1` function.
+
+.Graceful shutdown of the connection
+
+[source,erlang]
+gun:shutdown(ConnPid).
+
+Gun will refuse any new requests or messages after you call
+this function. It will however continue to send you messages
+for existing streams until they are all completed.
+
+For example if you performed a GET request just before calling
+`gun:shutdown/1`, you will still receive the response before
+Gun closes the connection.
+
+If you set a monitor beforehand, you will receive a message
+when the connection has been closed.
diff --git a/docs/en/gun/1.0/guide/connect/index.html b/docs/en/gun/1.0/guide/connect/index.html
new file mode 100644
index 00000000..ba463db5
--- /dev/null
+++ b/docs/en/gun/1.0/guide/connect/index.html
@@ -0,0 +1,302 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Connection</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Connection</span></h1>
+
+<div class="paragraph"><p>This chapter describes how to open, monitor and close
+a connection using the Gun client.</p></div>
+<div class="sect1">
+<h2 id="_gun_connections">Gun connections</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun is designed with the SPDY and Websocket protocols in mind.
+They are built for long-running connections that allow concurrent
+exchange of data, either in the form of request/responses for
+SPDY or in the form of messages for Websocket.</p></div>
+<div class="paragraph"><p>A Gun connection is an Erlang process that manages a socket to
+a remote endpoint. This Gun connection is owned by a user
+process that is called the <em>owner</em> of the connection, and is
+managed by the supervision tree of the <code>gun</code> application.</p></div>
+<div class="paragraph"><p>The owner process communicates with the Gun connection
+by calling functions from the module <code>gun</code>. All functions
+perform their respective operations asynchronously. The Gun
+connection will send Erlang messages to the owner process
+whenever needed.</p></div>
+<div class="paragraph"><p>When the remote endpoint closes the connection, Gun attempts
+to reconnect automatically.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_opening_a_new_connection">Opening a new connection</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>gun:open/{2,3}</code> function must be used to open a connection.</p></div>
+<div class="listingblock">
+<div class="title">Opening a connection to example.org on port 443</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If the port given is 443, Gun will attempt to connect using
+SSL. The protocol will be selected automatically using the
+NPN extension for TLS. By default Gun supports SPDY/3.1,
+SPDY/3 and HTTP/1.1 when connecting using SSL.</p></div>
+<div class="paragraph"><p>For any other port, Gun will attempt to connect using TCP
+and will use the HTTP/1.1 protocol.</p></div>
+<div class="paragraph"><p>The transport and protocol used can be overriden using
+options. The manual documents all available options.</p></div>
+<div class="paragraph"><p>Options can be provided as a third argument, and take the
+form of a map.</p></div>
+<div class="listingblock">
+<div class="title">Opening an SSL connection to example.org on port 8443</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">8443</span>, #{<span style="color: #0000FF">transport</span><span style="color: #990000">=&gt;</span><span style="color: #FF6600">ssl</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_waiting_for_the_connection_to_be_established">Waiting for the connection to be established</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>When Gun successfully connects to the server, it sends a
+<code>gun_up</code> message with the protocol that has been selected
+for the connection.</p></div>
+<div class="paragraph"><p>Gun provides the functions <code>gun:await_up/{1,2,3}</code> that wait
+for the <code>gun_up</code> message. They can optionally take a monitor
+reference and/or timeout value. If no monitor is provided,
+one will be created for the duration of the function call.</p></div>
+<div class="listingblock">
+<div class="title">Synchronous opening of a connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>),
+{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Protocol</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_up</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handling_connection_loss">Handling connection loss</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>When the connection is lost, Gun will send a <code>gun_down</code>
+message indicating the current protocol, the reason the
+connection was lost and two list of stream references.</p></div>
+<div class="paragraph"><p>The first list indicates open streams that <em>may</em> have been
+processed by the server. The second list indicates open
+streams that the server did not process.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_monitoring_the_connection_process">Monitoring the connection process</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>@todo Gun should detect the owner process being killed</p></div>
+<div class="paragraph"><p>Because software errors are unavoidable, it is important to
+detect when the Gun process crashes. It is also important
+to detect when it exits normally. Erlang provides two ways
+to do that: links and monitors.</p></div>
+<div class="paragraph"><p>Gun leaves you the choice as to which one will be used.
+However, if you use the <code>gun:await/{2,3}</code> or <code>gun:await_body/{2,3}</code>
+functions, a monitor may be used for you to avoid getting
+stuck waiting for a message that will never come.</p></div>
+<div class="paragraph"><p>If you choose to monitor yourself you can do it on a permanent
+basis rather than on every message you will receive, saving
+resources. Indeed, the <code>gun:await/{3,4}</code> and <code>gun:await_body/{3,4}</code>
+functions both accept a monitor argument if you have one already.</p></div>
+<div class="listingblock">
+<div class="title">Monitoring the connection process</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">ConnPid</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:open</span></span>(<span style="color: #FF0000">"example.org"</span>, <span style="color: #993399">443</span>)<span style="color: #990000">.</span>
+<span style="color: #009900">MRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">monitor</span></span>(<span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>This monitor reference can be kept and used until the connection
+process exits.</p></div>
+<div class="listingblock">
+<div class="title">Handling <code>DOWN</code> messages</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ <span style="font-style: italic"><span style="color: #9A1900">%% Receive Gun messages here...</span></span>
+ {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">Mref</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>);
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>What to do when you receive a <code>DOWN</code> message is entirely up to you.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_closing_the_connection_abruptly">Closing the connection abruptly</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The connection can be stopped abruptly at any time by calling
+the <code>gun:close/1</code> function.</p></div>
+<div class="listingblock">
+<div class="title">Immediate closing of the connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:close</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The process is stopped immediately without having a chance to
+perform the protocol&#8217;s closing handshake, if any.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_closing_the_connection_gracefully">Closing the connection gracefully</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The connection can also be stopped gracefully by calling the
+<code>gun:shutdown/1</code> function.</p></div>
+<div class="listingblock">
+<div class="title">Graceful shutdown of the connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:shutdown</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Gun will refuse any new requests or messages after you call
+this function. It will however continue to send you messages
+for existing streams until they are all completed.</p></div>
+<div class="paragraph"><p>For example if you performed a GET request just before calling
+<code>gun:shutdown/1</code>, you will still receive the response before
+Gun closes the connection.</p></div>
+<div class="paragraph"><p>If you set a monitor beforehand, you will receive a message
+when the connection has been closed.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/http.asciidoc b/docs/en/gun/1.0/guide/http.asciidoc
new file mode 100644
index 00000000..465a4c53
--- /dev/null
+++ b/docs/en/gun/1.0/guide/http.asciidoc
@@ -0,0 +1,362 @@
+== HTTP
+
+This chapter describes how to use the Gun client for
+communicating with an HTTP/1.1 or SPDY server.
+
+=== Streams
+
+Every time a request is initiated, Gun creates a _stream_.
+A _stream reference_ uniquely identifies a set of request and
+response(s) and must be used to perform additional operations
+with a stream or to identify its messages.
+
+Stream references use the Erlang _reference_ data type and
+are therefore unique.
+
+Streams can be canceled at any time. This will stop any further
+messages from being sent to the owner process. Depending on
+its capabilities, the server will also be instructed to cancel
+the request.
+
+Canceling a stream may result in Gun dropping the connection
+temporarily, to avoid uploading or downloading data that will
+not be used.
+
+.Cancelling a stream
+[source,erlang]
+gun:cancel(ConnPid, StreamRef).
+
+=== Sending requests
+
+Gun provides many convenient functions for performing common
+operations, like GET, POST or DELETE. It also provides a
+general purpose function in case you need other methods.
+
+The availability of these methods on the server can vary
+depending on the software used but also on a per-resource
+basis.
+
+Gun will automatically set a few headers depending on the
+method used. For all methods however it will set the host
+header if it has not been provided in the request arguments.
+
+This section focuses on the act of sending a request. The
+handling of responses will be explained further on.
+
+==== GET and HEAD
+
+Use `gun:get/{2,3}` to request a resource.
+
+.GET "/organizations/ninenines"
+
+[source,erlang]
+StreamRef = gun:get(ConnPid, "/organizations/ninenines").
+
+.GET "/organizations/ninenines" with custom headers
+
+[source,erlang]
+StreamRef = gun:get(ConnPid, "/organizations/ninenines", [
+ {<<"accept">>, "application/json"},
+ {<<"user-agent">>, "revolver/1.0"}
+]).
+
+Note that the list of headers has the field name as a binary.
+The field value is iodata, which is either a binary or an
+iolist.
+
+Use `gun:head/{2,3}` if you don't need the response body.
+
+.HEAD "/organizations/ninenines"
+
+[source,erlang]
+StreamRef = gun:head(ConnPid, "/organizations/ninenines").
+
+.HEAD "/organizations/ninenines" with custom headers
+
+[source,erlang]
+StreamRef = gun:head(ConnPid, "/organizations/ninenines", [
+ {<<"accept">>, "application/json"},
+ {<<"user-agent">>, "revolver/1.0"}
+]).
+
+It is not possible to send a request body with a GET or HEAD
+request.
+
+==== POST, PUT and PATCH
+
+HTTP defines three methods to create or update a resource.
+
+POST is generally used when the resource identifier (URI) isn't known
+in advance when creating the resource. POST can also be used to
+replace an existing resource, although PUT is more appropriate
+in that situation.
+
+PUT creates or replaces a resource identified by the URI.
+
+PATCH provides instructions on how to modify the resource.
+
+Both POST and PUT send the entire resource representation in their
+request body. The PATCH method can be used when this is not
+desirable. The request body of a PATCH method may be a partial
+representation or a list of instructions on how to update the
+resource.
+
+The `gun:post/4`, `gun:put/4` and `gun:patch/4` functions
+take a body as their fourth argument. These functions do
+not require any body-specific header to be set, although
+it is always recommended to set the content-type header.
+Gun will set the other headers automatically.
+
+In this and the following examples in this section, `gun:post`
+can be replaced by `gun:put` or `gun:patch` for performing
+a PUT or PATCH request, respectively.
+
+.POST "/organizations/ninenines"
+
+[source,erlang]
+Body = "{\"msg\": \"Hello world!\"}",
+StreamRef = gun:post(ConnPid, "/organizations/ninenines", [
+ {<<"content-type">>, "application/json"}
+], Body).
+
+The `gun:post/3`, `gun:put/3` and `gun:patch/3` functions
+do not take a body in their arguments. If a body is to be
+provided later on, using the `gun:data/4` function, then
+the request headers must indicate this. This can be done
+by setting the content-length or content-type request
+headers. If these headers are not set then Gun will assume
+the request has no body.
+
+It is recommended to send the content-length header if you
+know it in advance, although this is not required. If it
+is not set, HTTP/1.1 will use the chunked transfer-encoding,
+and SPDY will continue normally as it is chunked by design.
+
+.POST "/organizations/ninenines" with delayed body
+
+[source,erlang]
+Body = "{\"msg\": \"Hello world!\"}",
+StreamRef = gun:post(ConnPid, "/organizations/ninenines", [
+ {<<"content-length">>, integer_to_binary(length(Body))},
+ {<<"content-type">>, "application/json"}
+]),
+gun:data(ConnPid, StreamRef, fin, Body).
+
+The atom `fin` indicates this is the last chunk of data to
+be sent. You can call the `gun:data/4` function as many
+times as needed until you have sent the entire body. The
+last call must use `fin` and all the previous calls must
+use `nofin`. The last chunk may be empty.
+
+@todo what to do about empty chunk, ignore?
+
+.Streaming the request body
+
+[source,erlang]
+----
+sendfile(ConnPid, StreamRef, Filepath) ->
+ {ok, IoDevice} = file:open(Filepath, [read, binary, raw]),
+ do_sendfile(ConnPid, StreamRef, IoDevice).
+
+do_sendfile(ConnPid, StreamRef, IoDevice) ->
+ case file:read(IoDevice, 8000) of
+ eof ->
+ gun:data(ConnPid, StreamRef, fin, <<>>),
+ file:close(IoDevice);
+ {ok, Bin} ->
+ gun:data(ConnPid, StreamRef, nofin, Bin),
+ do_sendfile(ConnPid, StreamRef, IoDevice)
+ end.
+----
+
+==== DELETE
+
+Use `gun:delete/{2,3}` to delete a resource.
+
+.DELETE "/organizations/ninenines"
+
+[source,erlang]
+StreamRef = gun:delete(ConnPid, "/organizations/ninenines").
+
+.DELETE "/organizations/ninenines" with custom headers
+
+[source,erlang]
+StreamRef = gun:delete(ConnPid, "/organizations/ninenines", [
+ {<<"user-agent">>, "revolver/1.0"}
+]).
+
+==== OPTIONS
+
+Use `gun:options/{2,3}` to request information about a resource.
+
+.OPTIONS "/organizations/ninenines"
+
+[source,erlang]
+StreamRef = gun:options(ConnPid, "/organizations/ninenines").
+
+.OPTIONS "/organizations/ninenines" with custom headers
+
+[source,erlang]
+StreamRef = gun:options(ConnPid, "/organizations/ninenines", [
+ {<<"user-agent">>, "revolver/1.0"}
+]).
+
+You can also use this function to request information about
+the server itself.
+
+.OPTIONS "*"
+
+[source,erlang]
+StreamRef = gun:options(ConnPid, "*").
+
+==== Requests with an arbitrary method
+
+The `gun:request/{4,5}` function can be used to send requests
+with a configurable method name. It is mostly useful when you
+need a method that Gun does not understand natively.
+
+.Example of a TRACE request
+
+[source,erlang]
+gun:request(ConnPid, "TRACE", "/", [
+ {<<"max-forwards">>, "30"}
+]).
+
+=== Processing responses
+
+All data received from the server is sent to the owner
+process as a message. First a `gun_response` message is sent,
+followed by zero or more `gun_data` messages. If something goes wrong,
+a `gun_error` message is sent instead.
+
+The response message will inform you whether there will be
+data messages following. If it contains `fin` there will be
+no data messages. If it contains `nofin` then one or more data
+messages will follow.
+
+When using SPDY this value is sent with the frame and simply
+passed on in the message. When using HTTP/1.1 however Gun must
+guess whether data will follow by looking at the response headers.
+
+You can receive messages directly, or you can use the _await_
+functions to let Gun receive them for you.
+
+.Receiving a response using receive
+
+[source,erlang]
+----
+print_body(ConnPid, MRef) ->
+ StreamRef = gun:get(ConnPid, "/"),
+ receive
+ {gun_response, ConnPid, StreamRef, fin, Status, Headers} ->
+ no_data;
+ {gun_response, ConnPid, StreamRef, nofin, Status, Headers} ->
+ receive_data(ConnPid, MRef, StreamRef);
+ {'DOWN', MRef, process, ConnPid, Reason} ->
+ error_logger:error_msg("Oops!"),
+ exit(Reason)
+ after 1000 ->
+ exit(timeout)
+ end.
+
+receive_data(ConnPid, MRef, StreamRef) ->
+ receive
+ {gun_data, ConnPid, StreamRef, nofin, Data} ->
+ io:format("~s~n", [Data]),
+ receive_data(ConnPid, MRef, StreamRef);
+ {gun_data, ConnPid, StreamRef, fin, Data} ->
+ io:format("~s~n", [Data]);
+ {'DOWN', MRef, process, ConnPid, Reason} ->
+ error_logger:error_msg("Oops!"),
+ exit(Reason)
+ after 1000 ->
+ exit(timeout)
+ end.
+----
+
+While it may seem verbose, using messages like this has the
+advantage of never locking your process, allowing you to
+easily debug your code. It also allows you to start more than
+one connection and concurrently perform queries on all of them
+at the same time.
+
+You can also use Gun in a synchronous manner by using the _await_
+functions.
+
+The `gun:await/{2,3,4}` function will wait until it receives
+a response to, a pushed resource related to, or data from
+the given stream.
+
+When calling `gun:await/{2,3}` and not passing a monitor
+reference, one is automatically created for you for the
+duration of the call.
+
+The `gun:await_body/{2,3,4}` works similarly, but returns the
+body received. Both functions can be combined to receive the
+response and its body sequentially.
+
+.Receiving a response using await
+
+[source,erlang]
+StreamRef = gun:get(ConnPid, "/"),
+case gun:await(ConnPid, StreamRef) of
+ {response, fin, Status, Headers} ->
+ no_data;
+ {response, nofin, Status, Headers} ->
+ {ok, Body} = gun:await_body(ConnPid, StreamRef),
+ io:format("~s~n", [Body])
+end.
+
+=== Handling streams pushed by the server
+
+The SPDY protocol allows the server to push more than one
+resource for every request. It will start sending those
+extra resources before it starts sending the response itself,
+so Gun will send you `gun_push` messages before `gun_response`
+when that happens.
+
+You can safely choose to ignore `gun_push` messages, or
+you can handle them. If you do, you can either receive the
+messages directly or use _await_ functions.
+
+The `gun_push` message contains both the new stream reference
+and the stream reference of the original request.
+
+.Receiving a pushed response using receive
+
+[source,erlang]
+receive
+ {gun_push, ConnPid, OriginalStreamRef, PushedStreamRef,
+ Method, Host, Path, Headers} ->
+ enjoy()
+end.
+
+If you use the `gun:await/{2,3,4}` function, however, Gun
+will use the original reference to identify the message but
+will return a tuple that doesn't contain it.
+
+.Receiving a pushed response using await
+
+[source,erlang]
+{push, PushedStreamRef, Method, Host, Path, Headers}
+ = gun:await(ConnPid, OriginalStreamRef).
+
+The `PushedStreamRef` variable can then be used with `gun:await_body/{2,3,4}`
+if needed.
+
+=== Flushing unwanted messages
+
+Gun provides the function `gun:flush/1` to quickly get rid
+of unwanted messages sitting in the process mailbox. You
+can use it to get rid of all messages related to a connection,
+or just the messages related to a stream.
+
+.Flush all messages from a Gun connection
+
+[source,erlang]
+gun:flush(ConnPid).
+
+.Flush all messages from a specific stream
+
+[source,erlang]
+gun:flush(StreamRef).
diff --git a/docs/en/gun/1.0/guide/http/index.html b/docs/en/gun/1.0/guide/http/index.html
new file mode 100644
index 00000000..6934835d
--- /dev/null
+++ b/docs/en/gun/1.0/guide/http/index.html
@@ -0,0 +1,515 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: HTTP</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>HTTP</span></h1>
+
+<div class="paragraph"><p>This chapter describes how to use the Gun client for
+communicating with an HTTP/1.1 or SPDY server.</p></div>
+<div class="sect1">
+<h2 id="_streams">Streams</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Every time a request is initiated, Gun creates a <em>stream</em>.
+A <em>stream reference</em> uniquely identifies a set of request and
+response(s) and must be used to perform additional operations
+with a stream or to identify its messages.</p></div>
+<div class="paragraph"><p>Stream references use the Erlang <em>reference</em> data type and
+are therefore unique.</p></div>
+<div class="paragraph"><p>Streams can be canceled at any time. This will stop any further
+messages from being sent to the owner process. Depending on
+its capabilities, the server will also be instructed to cancel
+the request.</p></div>
+<div class="paragraph"><p>Canceling a stream may result in Gun dropping the connection
+temporarily, to avoid uploading or downloading data that will
+not be used.</p></div>
+<div class="listingblock">
+<div class="title">Cancelling a stream</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:cancel</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_requests">Sending requests</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun provides many convenient functions for performing common
+operations, like GET, POST or DELETE. It also provides a
+general purpose function in case you need other methods.</p></div>
+<div class="paragraph"><p>The availability of these methods on the server can vary
+depending on the software used but also on a per-resource
+basis.</p></div>
+<div class="paragraph"><p>Gun will automatically set a few headers depending on the
+method used. For all methods however it will set the host
+header if it has not been provided in the request arguments.</p></div>
+<div class="paragraph"><p>This section focuses on the act of sending a request. The
+handling of responses will be explained further on.</p></div>
+<div class="sect3">
+<h4 id="_get_and_head">GET and HEAD</h4>
+<div class="paragraph"><p>Use <code>gun:get/{2,3}</code> to request a resource.</p></div>
+<div class="listingblock">
+<div class="title">GET "/organizations/ninenines"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">GET "/organizations/ninenines" with custom headers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>},
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that the list of headers has the field name as a binary.
+The field value is iodata, which is either a binary or an
+iolist.</p></div>
+<div class="paragraph"><p>Use <code>gun:head/{2,3}</code> if you don&#8217;t need the response body.</p></div>
+<div class="listingblock">
+<div class="title">HEAD "/organizations/ninenines"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">HEAD "/organizations/ninenines" with custom headers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:head</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>},
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>It is not possible to send a request body with a GET or HEAD
+request.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_post_put_and_patch">POST, PUT and PATCH</h4>
+<div class="paragraph"><p>HTTP defines three methods to create or update a resource.</p></div>
+<div class="paragraph"><p>POST is generally used when the resource identifier (URI) isn&#8217;t known
+in advance when creating the resource. POST can also be used to
+replace an existing resource, although PUT is more appropriate
+in that situation.</p></div>
+<div class="paragraph"><p>PUT creates or replaces a resource identified by the URI.</p></div>
+<div class="paragraph"><p>PATCH provides instructions on how to modify the resource.</p></div>
+<div class="paragraph"><p>Both POST and PUT send the entire resource representation in their
+request body. The PATCH method can be used when this is not
+desirable. The request body of a PATCH method may be a partial
+representation or a list of instructions on how to update the
+resource.</p></div>
+<div class="paragraph"><p>The <code>gun:post/4</code>, <code>gun:put/4</code> and <code>gun:patch/4</code> functions
+take a body as their fourth argument. These functions do
+not require any body-specific header to be set, although
+it is always recommended to set the content-type header.
+Gun will set the other headers automatically.</p></div>
+<div class="paragraph"><p>In this and the following examples in this section, <code>gun:post</code>
+can be replaced by <code>gun:put</code> or <code>gun:patch</code> for performing
+a PUT or PATCH request, respectively.</p></div>
+<div class="listingblock">
+<div class="title">POST "/organizations/ninenines"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"{\"msg\": \"Hello world!\"}"</span>,
+<span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>}
+], <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The <code>gun:post/3</code>, <code>gun:put/3</code> and <code>gun:patch/3</code> functions
+do not take a body in their arguments. If a body is to be
+provided later on, using the <code>gun:data/4</code> function, then
+the request headers must indicate this. This can be done
+by setting the content-length or content-type request
+headers. If these headers are not set then Gun will assume
+the request has no body.</p></div>
+<div class="paragraph"><p>It is recommended to send the content-length header if you
+know it in advance, although this is not required. If it
+is not set, HTTP/1.1 will use the chunked transfer-encoding,
+and SPDY will continue normally as it is chunked by design.</p></div>
+<div class="listingblock">
+<div class="title">POST "/organizations/ninenines" with delayed body</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Body</span> <span style="color: #990000">=</span> <span style="color: #FF0000">"{\"msg\": \"Hello world!\"}"</span>,
+<span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:post</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-length"</span><span style="color: #990000">&gt;&gt;</span>, <span style="font-weight: bold"><span style="color: #000000">integer_to_binary</span></span>(<span style="font-weight: bold"><span style="color: #000080">length</span></span>(<span style="color: #009900">Body</span>))},
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-type"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"application/json"</span>}
+]),
+<span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Body</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The atom <code>fin</code> indicates this is the last chunk of data to
+be sent. You can call the <code>gun:data/4</code> function as many
+times as needed until you have sent the entire body. The
+last call must use <code>fin</code> and all the previous calls must
+use <code>nofin</code>. The last chunk may be empty.</p></div>
+<div class="paragraph"><p>@todo what to do about empty chunk, ignore?</p></div>
+<div class="listingblock">
+<div class="title">Streaming the request body</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Filepath</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IoDevice</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filepath</span>, [<span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #FF6600">raw</span>]),
+ <span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</span>)<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">file:read</span></span>(<span style="color: #009900">IoDevice</span>, <span style="color: #993399">8000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ <span style="color: #FF6600">eof</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #990000">&lt;&lt;&gt;&gt;</span>),
+ <span style="font-weight: bold"><span style="color: #000000">file:close</span></span>(<span style="color: #009900">IoDevice</span>);
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Bin</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">gun:data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Bin</span>),
+ <span style="font-weight: bold"><span style="color: #000000">do_sendfile</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">IoDevice</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_delete">DELETE</h4>
+<div class="paragraph"><p>Use <code>gun:delete/{2,3}</code> to delete a resource.</p></div>
+<div class="listingblock">
+<div class="title">DELETE "/organizations/ninenines"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">DELETE "/organizations/ninenines" with custom headers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:delete</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_options">OPTIONS</h4>
+<div class="paragraph"><p>Use <code>gun:options/{2,3}</code> to request information about a resource.</p></div>
+<div class="listingblock">
+<div class="title">OPTIONS "/organizations/ninenines"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">OPTIONS "/organizations/ninenines" with custom headers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/organizations/ninenines"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"user-agent"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"revolver/1.0"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can also use this function to request information about
+the server itself.</p></div>
+<div class="listingblock">
+<div class="title">OPTIONS "*"</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:options</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"*"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_requests_with_an_arbitrary_method">Requests with an arbitrary method</h4>
+<div class="paragraph"><p>The <code>gun:request/{4,5}</code> function can be used to send requests
+with a configurable method name. It is mostly useful when you
+need a method that Gun does not understand natively.</p></div>
+<div class="listingblock">
+<div class="title">Example of a TRACE request</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:request</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"TRACE"</span>, <span style="color: #FF0000">"/"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"max-forwards"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"30"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_processing_responses">Processing responses</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All data received from the server is sent to the owner
+process as a message. First a <code>gun_response</code> message is sent,
+followed by zero or more <code>gun_data</code> messages. If something goes wrong,
+a <code>gun_error</code> message is sent instead.</p></div>
+<div class="paragraph"><p>The response message will inform you whether there will be
+data messages following. If it contains <code>fin</code> there will be
+no data messages. If it contains <code>nofin</code> then one or more data
+messages will follow.</p></div>
+<div class="paragraph"><p>When using SPDY this value is sent with the frame and simply
+passed on in the message. When using HTTP/1.1 however Gun must
+guess whether data will follow by looking at the response headers.</p></div>
+<div class="paragraph"><p>You can receive messages directly, or you can use the <em>await</em>
+functions to let Gun receive them for you.</p></div>
+<div class="listingblock">
+<div class="title">Receiving a response using receive</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">print_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/"</span>),
+ <span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #FF6600">no_data</span>;
+ {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>);
+ {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">MRef</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #FF6600">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s~n"</span>, [<span style="color: #009900">Data</span>]),
+ <span style="font-weight: bold"><span style="color: #000000">receive_data</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">MRef</span>, <span style="color: #009900">StreamRef</span>);
+ {<span style="color: #FF6600">gun_data</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s~n"</span>, [<span style="color: #009900">Data</span>]);
+ {<span style="color: #FF6600">'DOWN'</span>, <span style="color: #009900">MRef</span>, <span style="font-weight: bold"><span style="color: #000080">process</span></span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">error_logger:error_msg</span></span>(<span style="color: #FF0000">"Oops!"</span>),
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #009900">Reason</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>While it may seem verbose, using messages like this has the
+advantage of never locking your process, allowing you to
+easily debug your code. It also allows you to start more than
+one connection and concurrently perform queries on all of them
+at the same time.</p></div>
+<div class="paragraph"><p>You can also use Gun in a synchronous manner by using the <em>await</em>
+functions.</p></div>
+<div class="paragraph"><p>The <code>gun:await/{2,3,4}</code> function will wait until it receives
+a response to, a pushed resource related to, or data from
+the given stream.</p></div>
+<div class="paragraph"><p>When calling <code>gun:await/{2,3}</code> and not passing a monitor
+reference, one is automatically created for you for the
+duration of the call.</p></div>
+<div class="paragraph"><p>The <code>gun:await_body/{2,3,4}</code> works similarly, but returns the
+body received. Both functions can be combined to receive the
+response and its body sequentially.</p></div>
+<div class="listingblock">
+<div class="title">Receiving a response using await</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">StreamRef</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:get</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/"</span>),
+<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">response</span>, <span style="color: #FF6600">fin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #FF6600">no_data</span>;
+ {<span style="color: #FF6600">response</span>, <span style="color: #FF6600">nofin</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Body</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await_body</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>),
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s~n"</span>, [<span style="color: #009900">Body</span>])
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_handling_streams_pushed_by_the_server">Handling streams pushed by the server</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The SPDY protocol allows the server to push more than one
+resource for every request. It will start sending those
+extra resources before it starts sending the response itself,
+so Gun will send you <code>gun_push</code> messages before <code>gun_response</code>
+when that happens.</p></div>
+<div class="paragraph"><p>You can safely choose to ignore <code>gun_push</code> messages, or
+you can handle them. If you do, you can either receive the
+messages directly or use <em>await</em> functions.</p></div>
+<div class="paragraph"><p>The <code>gun_push</code> message contains both the new stream reference
+and the stream reference of the original request.</p></div>
+<div class="listingblock">
+<div class="title">Receiving a pushed response using receive</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #FF6600">gun_push</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">OriginalStreamRef</span>, <span style="color: #009900">PushedStreamRef</span>,
+ <span style="color: #009900">Method</span>, <span style="color: #009900">Host</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">enjoy</span></span>()
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If you use the <code>gun:await/{2,3,4}</code> function, however, Gun
+will use the original reference to identify the message but
+will return a tuple that doesn&#8217;t contain it.</p></div>
+<div class="listingblock">
+<div class="title">Receiving a pushed response using await</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">push</span>, <span style="color: #009900">PushedStreamRef</span>, <span style="color: #009900">Method</span>, <span style="color: #009900">Host</span>, <span style="color: #009900">Path</span>, <span style="color: #009900">Headers</span>}
+ <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">gun:await</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">OriginalStreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The <code>PushedStreamRef</code> variable can then be used with <code>gun:await_body/{2,3,4}</code>
+if needed.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_flushing_unwanted_messages">Flushing unwanted messages</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun provides the function <code>gun:flush/1</code> to quickly get rid
+of unwanted messages sitting in the process mailbox. You
+can use it to get rid of all messages related to a connection,
+or just the messages related to a stream.</p></div>
+<div class="listingblock">
+<div class="title">Flush all messages from a Gun connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:flush</span></span>(<span style="color: #009900">ConnPid</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Flush all messages from a specific stream</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:flush</span></span>(<span style="color: #009900">StreamRef</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/index.html b/docs/en/gun/1.0/guide/index.html
new file mode 100644
index 00000000..bc2b9831
--- /dev/null
+++ b/docs/en/gun/1.0/guide/index.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Gun User Guide</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Gun User Guide</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="introduction/">Introduction</a>
+</p>
+</li>
+<li>
+<p>
+<a href="start/">Starting and stopping</a>
+</p>
+</li>
+<li>
+<p>
+<a href="protocols/">Supported protocols</a>
+</p>
+</li>
+<li>
+<p>
+<a href="connect/">Connection</a>
+</p>
+</li>
+<li>
+<p>
+<a href="http/">Using HTTP</a>
+</p>
+</li>
+<li>
+<p>
+<a href="websocket/">Using Websocket</a>
+</p>
+</li>
+</ul></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/introduction.asciidoc b/docs/en/gun/1.0/guide/introduction.asciidoc
new file mode 100644
index 00000000..81a7c7f4
--- /dev/null
+++ b/docs/en/gun/1.0/guide/introduction.asciidoc
@@ -0,0 +1,28 @@
+== Introduction
+
+Gun is an Erlang HTTP client with support for HTTP/1.1, SPDY and Websocket.
+
+=== Prerequisites
+
+Knowledge of Erlang, but also of the HTTP/1.1, SPDY and Websocket
+protocols is required in order to read this guide.
+
+=== Supported platforms
+
+Gun is tested and supported on Linux.
+
+Gun is developed for Erlang 18+.
+
+Gun may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as intended.
+
+=== Conventions
+
+In the HTTP protocol, the method name is case sensitive. All standard
+method names are uppercase.
+
+Header names are case insensitive. Gun converts all the header names
+to lowercase, and expects your application to provide lowercase header
+names.
+
+The same applies to any other case insensitive value.
diff --git a/docs/en/gun/1.0/guide/introduction/index.html b/docs/en/gun/1.0/guide/introduction/index.html
new file mode 100644
index 00000000..c8f85e5b
--- /dev/null
+++ b/docs/en/gun/1.0/guide/introduction/index.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Introduction</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Introduction</span></h1>
+
+<div class="paragraph"><p>Gun is an Erlang HTTP client with support for HTTP/1.1, SPDY and Websocket.</p></div>
+<div class="sect1">
+<h2 id="_prerequisites">Prerequisites</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Knowledge of Erlang, but also of the HTTP/1.1, SPDY and Websocket
+protocols is required in order to read this guide.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_supported_platforms">Supported platforms</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun is tested and supported on Linux.</p></div>
+<div class="paragraph"><p>Gun is developed for Erlang 18+.</p></div>
+<div class="paragraph"><p>Gun may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as intended.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_conventions">Conventions</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>In the HTTP protocol, the method name is case sensitive. All standard
+method names are uppercase.</p></div>
+<div class="paragraph"><p>Header names are case insensitive. Gun converts all the header names
+to lowercase, and expects your application to provide lowercase header
+names.</p></div>
+<div class="paragraph"><p>The same applies to any other case insensitive value.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/protocols.asciidoc b/docs/en/gun/1.0/guide/protocols.asciidoc
new file mode 100644
index 00000000..2180c5b4
--- /dev/null
+++ b/docs/en/gun/1.0/guide/protocols.asciidoc
@@ -0,0 +1,119 @@
+== Supported protocols
+
+This chapter describes the protocols supported and the
+operations available to them.
+
+=== HTTP/1.1
+
+HTTP/1.1 is a text request-response protocol. The client
+sends a request, the server sends back a response.
+
+Gun provides convenience functions for performing GET, HEAD,
+OPTIONS, POST, PATCH, PUT, and DELETE requests. All these
+functions are aliases of `gun:request/{4,5}` for each respective
+methods. Gun also provides a `gun:data/4` function for streaming
+the request body.
+
+Gun will send a `gun_response` message for every response
+received, followed by zero or more `gun_data` messages for
+the response body. If something goes wrong, a `gun_error`
+will be sent instead.
+
+Gun provides convenience functions for dealing with messages.
+The `gun:await/{2,3,4}` function waits for a response to the given
+request, and the `gun:await_body/{2,3,4}` function for the
+response's body. The `gun:flush/1` function can be used to clear all
+messages related to a request or a connection from the mailbox
+of the process.
+
+The function `gun:cancel/2` can be used to silence the
+response to a request previously sent if it is no longer
+needed. When using HTTP/1.1 there is no multiplexing so
+Gun will have to receive the response fully before any
+other response can be received.
+
+Finally, Gun can upgrade an HTTP/1.1 connection to Websocket.
+It provides the `gun:ws_upgrade/{2,3,4}` function for that
+purpose. A `gun_ws_upgrade` message will be sent on success;
+a `gun_response` message otherwise.
+
+=== SPDY
+
+SPDY is a binary protocol based on HTTP, compatible with
+the HTTP semantics, that reduces the complexity of parsing
+requests and responses, compresses the HTTP headers and
+allows the server to push multiple responses to a single
+request.
+
+The SPDY interface is very similar to HTTP/1.1, so this
+section instead focuses on the differences in the interface
+for the two protocols.
+
+Because a SPDY server can push multiple responses to a
+single request, Gun might send `gun_push` messages for
+every push received. They can be ignored safely if they
+are not needed.
+
+The `gun:cancel/2` function will use the SPDY stream
+cancellation mechanism which allows Gun to inform the
+server to stop sending a response for this particular
+request, saving resources.
+
+It is not possible to upgrade a SPDY connection to Websocket
+due to protocol limitations.
+
+=== Websocket
+
+Websocket is a binary protocol built on top of HTTP that
+allows asynchronous concurrent communication between the
+client and the server. A Websocket server can push data to
+the client at any time.
+
+Websocket is only available as a connection upgrade over
+an HTTP/1.1 connection.
+
+Once the Websocket connection is established, the only
+operation available on this connection is sending Websocket
+frames using `gun:ws_send/2`.
+
+Gun will send a `gun_ws` message for every frame received.
+
+=== Summary
+
+The two following tables summarize the supported operations
+and the messages Gun sends depending on the connection's
+current protocol.
+
+.Supported operations per protocol
+[cols="<,3*^",options="header"]
+|===
+| Operation | HTTP/1.1 | SPDY | Websocket
+| delete | yes | yes | no
+| get | yes | yes | no
+| head | yes | yes | no
+| options | yes | yes | no
+| patch | yes | yes | no
+| post | yes | yes | no
+| put | yes | yes | no
+| request | yes | yes | no
+| data | yes | yes | no
+| await | yes | yes | no
+| await_body | yes | yes | no
+| flush | yes | yes | no
+| cancel | yes | yes | no
+| ws_upgrade | yes | no | no
+| ws_send | no | no | yes
+|===
+
+.Messages sent per protocol
+[cols="<,3*^",options="header"]
+|===
+| Message | HTTP/1.1 | SPDY | Websocket
+| gun_push | no | yes | no
+| gun_response | yes | yes | no
+| gun_data | yes | yes | no
+| gun_error (StreamRef) | yes | yes | no
+| gun_error | yes | yes | yes
+| gun_ws_upgrade | yes | no | no
+| gun_ws | no | no | yes
+|===
diff --git a/docs/en/gun/1.0/guide/protocols/index.html b/docs/en/gun/1.0/guide/protocols/index.html
new file mode 100644
index 00000000..ed694fce
--- /dev/null
+++ b/docs/en/gun/1.0/guide/protocols/index.html
@@ -0,0 +1,395 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Supported protocols</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Supported protocols</span></h1>
+
+<div class="paragraph"><p>This chapter describes the protocols supported and the
+operations available to them.</p></div>
+<div class="sect1">
+<h2 id="_http_1_1">HTTP/1.1</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>HTTP/1.1 is a text request-response protocol. The client
+sends a request, the server sends back a response.</p></div>
+<div class="paragraph"><p>Gun provides convenience functions for performing GET, HEAD,
+OPTIONS, POST, PATCH, PUT, and DELETE requests. All these
+functions are aliases of <code>gun:request/{4,5}</code> for each respective
+methods. Gun also provides a <code>gun:data/4</code> function for streaming
+the request body.</p></div>
+<div class="paragraph"><p>Gun will send a <code>gun_response</code> message for every response
+received, followed by zero or more <code>gun_data</code> messages for
+the response body. If something goes wrong, a <code>gun_error</code>
+will be sent instead.</p></div>
+<div class="paragraph"><p>Gun provides convenience functions for dealing with messages.
+The <code>gun:await/{2,3,4}</code> function waits for a response to the given
+request, and the <code>gun:await_body/{2,3,4}</code> function for the
+response&#8217;s body. The <code>gun:flush/1</code> function can be used to clear all
+messages related to a request or a connection from the mailbox
+of the process.</p></div>
+<div class="paragraph"><p>The function <code>gun:cancel/2</code> can be used to silence the
+response to a request previously sent if it is no longer
+needed. When using HTTP/1.1 there is no multiplexing so
+Gun will have to receive the response fully before any
+other response can be received.</p></div>
+<div class="paragraph"><p>Finally, Gun can upgrade an HTTP/1.1 connection to Websocket.
+It provides the <code>gun:ws_upgrade/{2,3,4}</code> function for that
+purpose. A <code>gun_ws_upgrade</code> message will be sent on success;
+a <code>gun_response</code> message otherwise.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_spdy">SPDY</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>SPDY is a binary protocol based on HTTP, compatible with
+the HTTP semantics, that reduces the complexity of parsing
+requests and responses, compresses the HTTP headers and
+allows the server to push multiple responses to a single
+request.</p></div>
+<div class="paragraph"><p>The SPDY interface is very similar to HTTP/1.1, so this
+section instead focuses on the differences in the interface
+for the two protocols.</p></div>
+<div class="paragraph"><p>Because a SPDY server can push multiple responses to a
+single request, Gun might send <code>gun_push</code> messages for
+every push received. They can be ignored safely if they
+are not needed.</p></div>
+<div class="paragraph"><p>The <code>gun:cancel/2</code> function will use the SPDY stream
+cancellation mechanism which allows Gun to inform the
+server to stop sending a response for this particular
+request, saving resources.</p></div>
+<div class="paragraph"><p>It is not possible to upgrade a SPDY connection to Websocket
+due to protocol limitations.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_websocket">Websocket</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Websocket is a binary protocol built on top of HTTP that
+allows asynchronous concurrent communication between the
+client and the server. A Websocket server can push data to
+the client at any time.</p></div>
+<div class="paragraph"><p>Websocket is only available as a connection upgrade over
+an HTTP/1.1 connection.</p></div>
+<div class="paragraph"><p>Once the Websocket connection is established, the only
+operation available on this connection is sending Websocket
+frames using <code>gun:ws_send/2</code>.</p></div>
+<div class="paragraph"><p>Gun will send a <code>gun_ws</code> message for every frame received.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_summary">Summary</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The two following tables summarize the supported operations
+and the messages Gun sends depending on the connection&#8217;s
+current protocol.</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<caption class="title">Table 1. Supported operations per protocol</caption>
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Operation </th>
+<th align="center" valign="top"> HTTP/1.1 </th>
+<th align="center" valign="top"> SPDY </th>
+<th align="center" valign="top"> Websocket</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">delete</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">get</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">head</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">options</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">patch</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">post</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">put</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">request</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">data</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">await</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">await_body</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">flush</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">cancel</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">ws_upgrade</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">ws_send</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<caption class="title">Table 2. Messages sent per protocol</caption>
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<col width="25%" />
+<thead>
+<tr>
+<th align="left" valign="top"> Message </th>
+<th align="center" valign="top"> HTTP/1.1 </th>
+<th align="center" valign="top"> SPDY </th>
+<th align="center" valign="top"> Websocket</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table">gun_push</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_response</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_data</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_error (StreamRef)</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_error</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_ws_upgrade</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table">gun_ws</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">no</p></td>
+<td align="center" valign="top"><p class="table">yes</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/start.asciidoc b/docs/en/gun/1.0/guide/start.asciidoc
new file mode 100644
index 00000000..6d93e2e8
--- /dev/null
+++ b/docs/en/gun/1.0/guide/start.asciidoc
@@ -0,0 +1,67 @@
+== Starting and stopping
+
+This chapter describes how to start and stop the Gun application.
+
+=== Setting up
+
+Before Gun can be used it needs to be in Erlang's `ERL_LIBS` path variable.
+If you use `erlang.mk` or a similar build tool, you only need to specify
+Gun as a dependency to your application and the tool will take care
+of downloading Gun and setting up paths.
+
+With `erlang.mk` this is done by adding `gun` to the `DEPS` variable
+in your Makefile.
+
+.Adding Gun as an erlang.mk dependency
+
+[source,make]
+DEPS = gun
+
+=== Starting
+
+Gun is an _OTP application_. It needs to be started before you can
+use it.
+
+.Starting Gun in an Erlang shell
+
+[source,erlang]
+----
+1> application:ensure_all_started(gun).
+{ok,[ranch,crypto,cowlib,asn1,public_key,ssl,gun]}
+----
+
+=== Stopping
+
+You can stop Gun using the `application:stop/1` function, however
+only Gun will be stopped. This is the equivalent of `application:start/1`.
+The `application_ensure_all_started/1` function has no equivalent for
+stopping all applications.
+
+.Stopping Gun
+
+[source,erlang]
+application:stop(gun).
+
+=== Using Gun with releases
+
+An _OTP release_ starts applications automatically. All you need
+to do is to set up your application resource file so that Gun can
+be included in the release. The application resource file can be
+found in `ebin/your_application.app`, or in `src/your_application.app.src`
+if you are using a build tool like `erlang.mk`.
+
+The key you need to change is the `applications` key. By default
+it only includes `kernel` and `stdlib`. You need to add `gun` to
+that list.
+
+.Adding Gun to the application resource file
+
+[source,erlang]
+{applications, [
+ kernel,
+ stdlib,
+ gun
+]}
+
+Do not put an extra comma at the end, the comma is a separator
+between the elements of the list.
diff --git a/docs/en/gun/1.0/guide/start/index.html b/docs/en/gun/1.0/guide/start/index.html
new file mode 100644
index 00000000..d8b8cc96
--- /dev/null
+++ b/docs/en/gun/1.0/guide/start/index.html
@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Starting and stopping</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Starting and stopping</span></h1>
+
+<div class="paragraph"><p>This chapter describes how to start and stop the Gun application.</p></div>
+<div class="sect1">
+<h2 id="_setting_up">Setting up</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Before Gun can be used it needs to be in Erlang&#8217;s <code>ERL_LIBS</code> path variable.
+If you use <code>erlang.mk</code> or a similar build tool, you only need to specify
+Gun as a dependency to your application and the tool will take care
+of downloading Gun and setting up paths.</p></div>
+<div class="paragraph"><p>With <code>erlang.mk</code> this is done by adding <code>gun</code> to the <code>DEPS</code> variable
+in your Makefile.</p></div>
+<div class="listingblock">
+<div class="title">Adding Gun as an erlang.mk dependency</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">DEPS =</span> gun</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_starting">Starting</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun is an <em>OTP application</em>. It needs to be started before you can
+use it.</p></div>
+<div class="listingblock">
+<div class="title">Starting Gun in an Erlang shell</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #993399">1</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #000000">application:ensure_all_started</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span>
+{<span style="color: #FF6600">ok</span>,[<span style="color: #FF6600">ranch</span>,<span style="color: #FF6600">crypto</span>,<span style="color: #FF6600">cowlib</span>,<span style="color: #FF6600">asn1</span>,<span style="color: #FF6600">public_key</span>,<span style="color: #FF6600">ssl</span>,<span style="color: #FF6600">gun</span>]}</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_stopping">Stopping</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can stop Gun using the <code>application:stop/1</code> function, however
+only Gun will be stopped. This is the equivalent of <code>application:start/1</code>.
+The <code>application_ensure_all_started/1</code> function has no equivalent for
+stopping all applications.</p></div>
+<div class="listingblock">
+<div class="title">Stopping Gun</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">application:stop</span></span>(<span style="color: #FF6600">gun</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_gun_with_releases">Using Gun with releases</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>An <em>OTP release</em> starts applications automatically. All you need
+to do is to set up your application resource file so that Gun can
+be included in the release. The application resource file can be
+found in <code>ebin/your_application.app</code>, or in <code>src/your_application.app.src</code>
+if you are using a build tool like <code>erlang.mk</code>.</p></div>
+<div class="paragraph"><p>The key you need to change is the <code>applications</code> key. By default
+it only includes <code>kernel</code> and <code>stdlib</code>. You need to add <code>gun</code> to
+that list.</p></div>
+<div class="listingblock">
+<div class="title">Adding Gun to the application resource file</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">applications</span>, [
+ <span style="color: #FF6600">kernel</span>,
+ <span style="color: #FF6600">stdlib</span>,
+ <span style="color: #FF6600">gun</span>
+]}</tt></pre></div></div>
+<div class="paragraph"><p>Do not put an extra comma at the end, the comma is a separator
+between the elements of the list.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/guide/websocket.asciidoc b/docs/en/gun/1.0/guide/websocket.asciidoc
new file mode 100644
index 00000000..4869a2e4
--- /dev/null
+++ b/docs/en/gun/1.0/guide/websocket.asciidoc
@@ -0,0 +1,112 @@
+== Websocket
+
+This chapter describes how to use the Gun client for
+communicating with a Websocket server.
+
+@todo recovering from connection failure
+reconnecting to Websocket etc.
+
+=== HTTP upgrade
+
+Websocket is a protocol built on top of HTTP. To use Websocket,
+you must first request for the connection to be upgraded. Only
+HTTP/1.1 connections can be upgraded to Websocket, so you might
+need to restrict the protocol to HTTP/1.1 if you are planning
+to use Websocket over TLS.
+
+You must use the `gun_ws:upgrade/{2,3,4}` function to upgrade
+to Websocket. This function can be called anytime after connection,
+so you can send HTTP requests before upgrading to Websocket.
+
+.Upgrade to Websocket
+
+[source,erlang]
+gun:ws_upgrade(ConnPid, "/websocket").
+
+Gun will set all the necessary headers for performing the
+Websocket upgrade, but you can specify additional headers
+if needed. For example you can request a custom sub-protocol.
+
+.Upgrade to Websocket and request a protocol
+
+[source,erlang]
+gun:ws_upgrade(ConnPid, "/websocket", [
+ {<<"sec-websocket-protocol">>, "mychat"}
+]).
+
+You can pass the Websocket options as part of the `gun:open/{2,3}`
+call when opening the connection, or using the `gun:ws_upgrade/4`.
+The fourth argument is those same options. This function call
+will crash if the options are incorrect, unlike when passing
+them through `gun:open/{2,3}`.
+
+When the upgrade succeeds, a `gun_ws_upgrade` message is sent.
+If the server does not understand Websocket or refused the
+upgrade, a `gun_response` message is sent. If Gun couldn't
+perform the upgrade due to an error (for example attempting
+to upgrade to Websocket on an HTTP/1.0 connection) then a
+`gun_error` message is sent.
+
+When the server does not understand Websocket, it may send
+a meaningful response which should be processed. In the
+following example we however ignore it:
+
+[source,erlang]
+receive
+ {gun_ws_upgrade, ConnPid, ok, Headers} ->
+ upgrade_success(ConnPid);
+ {gun_response, ConnPid, _, _, Status, Headers} ->
+ exit({ws_upgrade_failed, Status, Headers});
+ {gun_error, ConnPid, StreamRef, Reason} ->
+ exit({ws_upgrade_failed, Reason})
+ %% More clauses here as needed.
+after 1000 ->
+ exit(timeout)
+end.
+
+=== Sending data
+
+Once the Websocket upgrade has completed successfully, you no
+longer have access to functions for performing requests. You
+can only send and receive Websocket messages.
+
+Use `gun:ws_send/2` to send one or more messages to the server.
+
+@todo Implement sending of N frames
+
+.Send a text frame
+
+[source,erlang]
+gun:ws_send(ConnPid, {text, "Hello!"}).
+
+.Send a text frame, a binary frame and then close the connection
+
+[source,erlang]
+gun:ws_send(ConnPid, [
+ {text, "Hello!"},
+ {binary, BinaryValue},
+ close
+]).
+
+Note that if you send a close frame, Gun will close the connection
+cleanly and will not attempt to reconnect afterwards, similar to
+calling `gun:shutdown/1`.
+
+=== Receiving data
+
+Gun sends an Erlang message to the owner process for every
+Websocket message it receives.
+
+[source,erlang]
+receive
+ {gun_ws, ConnPid, Frame} ->
+ handle_frame(ConnPid, Frame)
+end.
+
+@todo auto ping has not been implemented yet
+
+Gun will automatically send ping messages to the server to keep
+the connection alive, however if the connection dies and Gun has
+to reconnect it will not upgrade to Websocket automatically, you
+need to perform the operation when you receive the `gun_error`
+message.
diff --git a/docs/en/gun/1.0/guide/websocket/index.html b/docs/en/gun/1.0/guide/websocket/index.html
new file mode 100644
index 00000000..78a34d42
--- /dev/null
+++ b/docs/en/gun/1.0/guide/websocket/index.html
@@ -0,0 +1,259 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Websocket</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Websocket</span></h1>
+
+<div class="paragraph"><p>This chapter describes how to use the Gun client for
+communicating with a Websocket server.</p></div>
+<div class="paragraph"><p>@todo recovering from connection failure
+reconnecting to Websocket etc.</p></div>
+<div class="sect1">
+<h2 id="_http_upgrade">HTTP upgrade</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Websocket is a protocol built on top of HTTP. To use Websocket,
+you must first request for the connection to be upgraded. Only
+HTTP/1.1 connections can be upgraded to Websocket, so you might
+need to restrict the protocol to HTTP/1.1 if you are planning
+to use Websocket over TLS.</p></div>
+<div class="paragraph"><p>You must use the <code>gun_ws:upgrade/{2,3,4}</code> function to upgrade
+to Websocket. This function can be called anytime after connection,
+so you can send HTTP requests before upgrading to Websocket.</p></div>
+<div class="listingblock">
+<div class="title">Upgrade to Websocket</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/websocket"</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Gun will set all the necessary headers for performing the
+Websocket upgrade, but you can specify additional headers
+if needed. For example you can request a custom sub-protocol.</p></div>
+<div class="listingblock">
+<div class="title">Upgrade to Websocket and request a protocol</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:ws_upgrade</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #FF0000">"/websocket"</span>, [
+ {<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sec-websocket-protocol"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"mychat"</span>}
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can pass the Websocket options as part of the <code>gun:open/{2,3}</code>
+call when opening the connection, or using the <code>gun:ws_upgrade/4</code>.
+The fourth argument is those same options. This function call
+will crash if the options are incorrect, unlike when passing
+them through <code>gun:open/{2,3}</code>.</p></div>
+<div class="paragraph"><p>When the upgrade succeeds, a <code>gun_ws_upgrade</code> message is sent.
+If the server does not understand Websocket or refused the
+upgrade, a <code>gun_response</code> message is sent. If Gun couldn&#8217;t
+perform the upgrade due to an error (for example attempting
+to upgrade to Websocket on an HTTP/1.0 connection) then a
+<code>gun_error</code> message is sent.</p></div>
+<div class="paragraph"><p>When the server does not understand Websocket, it may send
+a meaningful response which should be processed. In the
+following example we however ignore it:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #FF6600">gun_ws_upgrade</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">upgrade_success</span></span>(<span style="color: #009900">ConnPid</span>);
+ {<span style="color: #FF6600">gun_response</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #990000">_</span>, <span style="color: #990000">_</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>({<span style="color: #FF6600">ws_upgrade_failed</span>, <span style="color: #009900">Status</span>, <span style="color: #009900">Headers</span>});
+ {<span style="color: #FF6600">gun_error</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">StreamRef</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>({<span style="color: #FF6600">ws_upgrade_failed</span>, <span style="color: #009900">Reason</span>})
+ <span style="font-style: italic"><span style="color: #9A1900">%% More clauses here as needed.</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">after</span></span> <span style="color: #993399">1000</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000080">exit</span></span>(<span style="color: #FF6600">timeout</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_data">Sending data</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Once the Websocket upgrade has completed successfully, you no
+longer have access to functions for performing requests. You
+can only send and receive Websocket messages.</p></div>
+<div class="paragraph"><p>Use <code>gun:ws_send/2</code> to send one or more messages to the server.</p></div>
+<div class="paragraph"><p>@todo Implement sending of N frames</p></div>
+<div class="listingblock">
+<div class="title">Send a text frame</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:ws_send</span></span>(<span style="color: #009900">ConnPid</span>, {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello!"</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Send a text frame, a binary frame and then close the connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">gun:ws_send</span></span>(<span style="color: #009900">ConnPid</span>, [
+ {<span style="color: #FF6600">text</span>, <span style="color: #FF0000">"Hello!"</span>},
+ {<span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">BinaryValue</span>},
+ <span style="color: #FF6600">close</span>
+])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that if you send a close frame, Gun will close the connection
+cleanly and will not attempt to reconnect afterwards, similar to
+calling <code>gun:shutdown/1</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_receiving_data">Receiving data</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gun sends an Erlang message to the owner process for every
+Websocket message it receives.</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #FF6600">gun_ws</span>, <span style="color: #009900">ConnPid</span>, <span style="color: #009900">Frame</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">ConnPid</span>, <span style="color: #009900">Frame</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>@todo auto ping has not been implemented yet</p></div>
+<div class="paragraph"><p>Gun will automatically send ping messages to the server to keep
+the connection alive, however if the connection dies and Gun has
+to reconnect it will not upgrade to Websocket automatically, you
+need to perform the operation when you receive the <code>gun_error</code>
+message.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/guide">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/index.html b/docs/en/gun/1.0/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/gun/1.0/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/gun/1.0/manual/gun/index.html b/docs/en/gun/1.0/manual/gun/index.html
new file mode 100644
index 00000000..dc40e30e
--- /dev/null
+++ b/docs/en/gun/1.0/manual/gun/index.html
@@ -0,0 +1,1734 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: gun(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>gun(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>gun - asynchronous HTTP client</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>gun</code> module provides an asynchronous interface for
+connecting and communicating with Web servers over SPDY,
+HTTP or Websocket.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_opts_map">opts() = map()</h3>
+<div class="paragraph"><p>Configuration for the connection.</p></div>
+<div class="paragraph"><p>The following keys are defined:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+http_opts &#8658; http_opts()
+</dt>
+<dd>
+<p>
+ Options specific to the HTTP protocol. See below.
+</p>
+</dd>
+<dt class="hdlist1">
+protocols &#8658; [http | spdy]
+</dt>
+<dd>
+<p>
+ Ordered list of preferred protocols. When the transport is tcp,
+ this list must contain exactly one protocol. When the transport
+ is ssl, this list must contain at least one protocol and will be
+ used using the NPN protocol negotiation method. When the server
+ does not support NPN then http will always be used. Defaults to
+ [http] when the transport is tcp, and [spdy, http] when the
+ transport is ssl.
+</p>
+</dd>
+<dt class="hdlist1">
+retry &#8658; non_neg_integer()
+</dt>
+<dd>
+<p>
+ Number of times Gun will try to reconnect on failure before giving up.
+ Defaults to 5.
+</p>
+</dd>
+<dt class="hdlist1">
+retry_timeout &#8658; pos_integer()
+</dt>
+<dd>
+<p>
+ Time between retries in milliseconds. Defaults to 5000.
+</p>
+</dd>
+<dt class="hdlist1">
+spdy_opts &#8658; spdy_opts()
+</dt>
+<dd>
+<p>
+ Options specific to the SPDY protocol. See below.
+</p>
+</dd>
+<dt class="hdlist1">
+trace &#8658; boolean()
+</dt>
+<dd>
+<p>
+ Whether to enable <code>dbg</code> tracing of the connection process. Should
+ only be used during debugging. Defaults to false.
+</p>
+</dd>
+<dt class="hdlist1">
+transport &#8658; tcp | ssl
+</dt>
+<dd>
+<p>
+ Whether to use SSL or plain TCP. The default varies depending on the
+ port used. Port 443 defaults to ssl. All other ports default to tcp.
+</p>
+</dd>
+<dt class="hdlist1">
+transport_opts &#8658; proplists:proplist()
+</dt>
+<dd>
+<p>
+ Transport options. They are TCP options or SSL options depending on
+ the selected transport.
+</p>
+</dd>
+<dt class="hdlist1">
+ws_opts &#8658; ws_opts()
+</dt>
+<dd>
+<p>
+ Options specific to the Websocket protocol. See below.
+</p>
+</dd>
+</dl></div>
+</div>
+<div class="sect2">
+<h3 id="_http_opts_map">http_opts() = map()</h3>
+<div class="paragraph"><p>Configuration for the HTTP protocol.</p></div>
+<div class="paragraph"><p>The following keys are defined:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+keepalive &#8658; pos_integer()
+</dt>
+<dd>
+<p>
+ Time between pings in milliseconds. Since the HTTP protocol has
+ no standardized way to ping the server, Gun will simply send an
+ empty line when the connection is idle. Gun only makes a best
+ effort here as servers usually have configurable limits to drop
+ idle connections. Defaults to 5000.
+</p>
+</dd>
+<dt class="hdlist1">
+version &#8658; <em>HTTP/1.1</em> | <em>HTTP/1.0</em>
+</dt>
+<dd>
+<p>
+ HTTP version to use. Defaults to <em>HTTP/1.1</em>.
+</p>
+</dd>
+</dl></div>
+</div>
+<div class="sect2">
+<h3 id="_spdy_opts_map">spdy_opts() = map()</h3>
+<div class="paragraph"><p>Configuration for the SPDY protocol.</p></div>
+<div class="paragraph"><p>The following keys are defined:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+keepalive &#8658; pos_integer()
+</dt>
+<dd>
+<p>
+ Time between pings in milliseconds. Defaults to 5000.
+</p>
+</dd>
+</dl></div>
+</div>
+<div class="sect2">
+<h3 id="_ws_opts_map">ws_opts() = map()</h3>
+<div class="paragraph"><p>Configuration for the Websocket protocol.</p></div>
+<div class="paragraph"><p>The following keys are defined:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+compress &#8658; boolean()
+</dt>
+<dd>
+<p>
+ Whether to enable permessage-deflate compression. This does
+ not guarantee that compression will be used as it is the
+ server that ultimately decides. Defaults to false.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_messages">Messages</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Calling functions from this module may result in the following
+messages being sent.</p></div>
+<div class="sect2">
+<h3 id="_gun_up_connpid_protocol">{gun_up, ConnPid, Protocol}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Protocol = http | spdy
+</dt>
+<dd>
+<p>
+The protocol selected for this connection.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>The connection is up.</p></div>
+<div class="paragraph"><p>This message informs the owner process that the connection or
+reconnection completed.</p></div>
+<div class="paragraph"><p>The protocol selected during the connection is sent in this
+message. It can be used to determine the capabilities of the
+server.</p></div>
+<div class="paragraph"><p>Gun will now start processing the messages it received while
+waiting for the connection to be up. If this is a reconnection,
+then this may not be desirable for all requests. Those requests
+should be cancelled when the connection goes down, and any
+subsequent messages ignored.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_down_connpid_protocol_reason_killedstreams_unprocessedstreams">{gun_down, ConnPid, Protocol, Reason, KilledStreams, UnprocessedStreams}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Protocol = http | spdy | ws
+</dt>
+<dd>
+<p>
+The protocol in use when the connection was lost.
+</p>
+</dd>
+<dt class="hdlist1">
+Reason = normal | closed | {error, atom()}
+</dt>
+<dd>
+<p>
+The reason for the loss of the connection.
+</p>
+</dd>
+<dt class="hdlist1">
+KilledStreams = [reference()]
+</dt>
+<dd>
+<p>
+List of streams that have been brutally terminated.
+</p>
+</dd>
+<dt class="hdlist1">
+UnprocessedStreams = [reference()]
+</dt>
+<dd>
+<p>
+List of streams that have not been processed by the server.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>The connection is down.</p></div>
+<div class="paragraph"><p>This message informs the owner process that the connection is
+currently down. Gun will automatically attempt to reconnect
+depending on the <code>retry</code> and <code>retry_timeout</code> options.</p></div>
+<div class="paragraph"><p>The reason of the termination is there for debugging purposes
+only. You should not rely on this value to know what streams
+were processed or completed.</p></div>
+<div class="paragraph"><p>The <em>killed streams</em> are the active streams that did not complete
+before the closing of the connection. Whether they can be retried
+safely depends on the protocol used and the idempotence property
+of the requests.</p></div>
+<div class="paragraph"><p>The <em>unprocessed streams</em> are streams that the server did not
+start processing yet. They may be retried safely depending on
+what streams were killed before.</p></div>
+<div class="paragraph"><p>When the connection goes back up, Gun will not attempt to retry
+requests. It will also not upgrade to Websocket automatically
+if that was the protocol in use when the connection was lost.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_push_connpid_streamref_newstreamref_uri_headers">{gun_push, ConnPid, StreamRef, NewStreamRef, URI, Headers}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream initiated by the owner process.
+</p>
+</dd>
+<dt class="hdlist1">
+NewStreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream being pushed.
+</p>
+</dd>
+<dt class="hdlist1">
+URI = binary()
+</dt>
+<dd>
+<p>
+URI of the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), binary()}]
+</dt>
+<dd>
+<p>
+Headers @todo
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>A resource pushed alongside an HTTP response.</p></div>
+<div class="paragraph"><p>This message can only be sent when the protocol is SPDY.</p></div>
+<div class="paragraph"><p>@todo I fear we also need the scheme; resource is identified by URI
+@todo Perhaps we really should send the URI entirely, because cache
+@todo relies on URI to work and this feature is for caching&#8230;
+@todo Not sure why Method is there, spec says it is only for GET</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_response_connpid_streamref_isfin_status_headers">{gun_response, ConnPid, StreamRef, IsFin, Status, Headers}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream initiated by the owner process.
+</p>
+</dd>
+<dt class="hdlist1">
+IsFin = fin | nofin
+</dt>
+<dd>
+<p>
+Whether this message terminates the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Status = binary()
+</dt>
+<dd>
+<p>
+Status line for the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), binary()}]
+</dt>
+<dd>
+<p>
+Headers sent with the response.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>A response to an HTTP request.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_data_connpid_streamref_isfin_data">{gun_data, ConnPid, StreamRef, IsFin, Data}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream this data belongs to.
+</p>
+</dd>
+<dt class="hdlist1">
+IsFin = fin | nofin
+</dt>
+<dd>
+<p>
+Whether this message terminates the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Data = binary()
+</dt>
+<dd>
+<p>
+Data from the stream.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Data associated with a stream.</p></div>
+<div class="paragraph"><p>The stream in question can be either one initiated by the owner
+process or a stream initiated by the server through the push
+mechanism. In any case a <code>gun_response</code> or a <code>gun_push</code> message
+will be sent before any <code>gun_data</code> message.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_error_connpid_streamref_reason">{gun_error, ConnPid, StreamRef, Reason}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream this error relates to.
+</p>
+</dd>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Error reason.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Stream-specific error.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_error_connpid_reason">{gun_error, ConnPid, Reason}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Error reason.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>General error.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_ws_upgrade_connpid_ok_headers">{gun_ws_upgrade, ConnPid, ok, Headers}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), binary()}]
+</dt>
+<dd>
+<p>
+Headers sent with the response.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Successful upgrade to the Websocket protocol.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_gun_ws_connpid_frame">{gun_ws, ConnPid, Frame}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Frame = @todo
+</dt>
+<dd>
+<p>
+Frame.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Websocket frame.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_open_host_port_8594_open_host_port">open(Host, Port) &#8594; open(Host, Port, [])</h3>
+<div class="paragraph"><p>Alias of <code>gun:open/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_open_host_port_opts_8594_ok_connpid_error_reason">open(Host, Port, Opts) &#8594; {ok, ConnPid} | {error, Reason}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Host = inet:hostname()
+</dt>
+<dd>
+<p>
+Host to connect to.
+</p>
+</dd>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Port to connect to.
+</p>
+</dd>
+<dt class="hdlist1">
+Opts = opts()
+</dt>
+<dd>
+<p>
+Options for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Error reason. @todo really any?
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Open a connection to the given host and port.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_close_connpid_8594_ok">close(ConnPid) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Brutally close the connection.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_shutdown_connpid_8594_ok">shutdown(ConnPid) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Gracefully close the connection.</p></div>
+<div class="paragraph"><p>A monitor can be used to be notified when the connection is
+effectively closed.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_delete_connpid_path_8594_delete_connpid_path">delete(ConnPid, Path) &#8594; delete(ConnPid, Path, [])</h3>
+<div class="paragraph"><p>Alias of <code>gun:delete/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_delete_connpid_path_headers_8594_streamref">delete(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Delete a resource.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_connpid_path_8594_get_connpid_path">get(ConnPid, Path) &#8594; get(ConnPid, Path, [])</h3>
+<div class="paragraph"><p>Alias of <code>gun:get/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_connpid_path_headers_8594_streamref">get(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Get a resource.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_head_connpid_path_8594_head_connpid_path">head(ConnPid, Path) &#8594; head(ConnPid, Path, [])</h3>
+<div class="paragraph"><p>Alias of <code>gun:head/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_head_connpid_path_headers_8594_streamref">head(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Get headers of a resource.</p></div>
+<div class="paragraph"><p>This function performs the same operation as <code>get/{2,3}</code> except
+the server will not send the resource representation, only the
+response&#8217;s status line and headers.</p></div>
+<div class="paragraph"><p>While servers should send the same headers they would if the
+request was a GET, like <code>content-length</code>, it is not always
+the case and differences may exist.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_options_connpid_path_8594_options_connpid_path">options(ConnPid, Path) &#8594; options(ConnPid, Path, [])</h3>
+<div class="paragraph"><p>Alias of <code>gun:options/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_options_connpid_path_headers_8594_streamref">options(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Obtain information about the capabilities of the server or of a resource.</p></div>
+<div class="paragraph"><p>The special path <code>"*"</code> can be used to obtain information about
+the server as a whole. Any other path will return information
+about the resource only.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_patch_connpid_path_headers_8594_streamref">patch(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Request that a set of changes be applied to the resource.</p></div>
+<div class="paragraph"><p>This function expects either <code>content-length</code> or <code>content-type</code>
+to be set to know a body is going to be sent afterwards.
+Gun will assume the request has no body otherwise. It is
+highly recommended to set both when possible.</p></div>
+<div class="paragraph"><p>The body sent in this request should be a patch document
+with instructions on how to update the resource.</p></div>
+<div class="paragraph"><p>You can use the <code>gun:data/4</code> function to send the body, if any.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_patch_connpid_path_headers_body_8594_streamref">patch(ConnPid, Path, Headers, Body) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Body of the request.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Request that a set of changes be applied to the resource.</p></div>
+<div class="paragraph"><p>It is highly recommended to set the <code>content-type</code> header
+to inform the server what media type the body contains.
+Gun will automatically set the <code>content-length</code> header.</p></div>
+<div class="paragraph"><p>The body sent in this request should be a patch document
+with instructions on how to update the resource.</p></div>
+<div class="paragraph"><p>The complete request is sent when calling this function.
+It is not possible to stream more of the body after
+calling it.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_post_connpid_path_headers_8594_streamref">post(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Process the enclosed representation according to the resource&#8217;s own semantics.</p></div>
+<div class="paragraph"><p>This function expects either <code>content-length</code> or <code>content-type</code>
+to be set to know a body is going to be sent afterwards.
+Gun will assume the request has no body otherwise. It is
+highly recommended to set both when possible.</p></div>
+<div class="paragraph"><p>The body sent in this request will be processed
+according to the resource&#8217;s own semantics. A new
+resource may be created as a result, and may be
+located at a different URI.</p></div>
+<div class="paragraph"><p>You can use the <code>gun:data/4</code> function to send the body, if any.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_post_connpid_path_headers_body_8594_streamref">post(ConnPid, Path, Headers, Body) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Body of the request.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Process the enclosed representation according to the resource&#8217;s own semantics.</p></div>
+<div class="paragraph"><p>It is highly recommended to set the <code>content-type</code> header
+to inform the server what media type the body contains.
+Gun will automatically set the <code>content-length</code> header.</p></div>
+<div class="paragraph"><p>The body sent in this request will be processed
+according to the resource&#8217;s own semantics. A new
+resource may be created as a result, and may be
+located at a different URI.</p></div>
+<div class="paragraph"><p>The complete request is sent when calling this function.
+It is not possible to stream more of the body after
+calling it.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_put_connpid_path_headers_8594_streamref">put(ConnPid, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Create or replace a resource.</p></div>
+<div class="paragraph"><p>The body of the request is the entire representation of the resource.</p></div>
+<div class="paragraph"><p>This function expects either <code>content-length</code> or <code>content-type</code>
+to be set to know a body is going to be sent afterwards.
+Gun will assume the request has no body otherwise. It is
+highly recommended to set both when possible.</p></div>
+<div class="paragraph"><p>You can use the <code>gun:data/4</code> function to send the body, if any.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_put_connpid_path_headers_body_8594_streamref">put(ConnPid, Path, Headers, Body) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Body of the request.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Create or replace a resource.</p></div>
+<div class="paragraph"><p>The body of the request is the entire representation of the resource.</p></div>
+<div class="paragraph"><p>It is highly recommended to set the <code>content-type</code> header
+to inform the server what media type the body contains.
+Gun will automatically set the <code>content-length</code> header.</p></div>
+<div class="paragraph"><p>The complete request is sent when calling this function.
+It is not possible to stream more of the body after
+calling it.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_request_connpid_method_path_headers_8594_streamref">request(ConnPid, Method, Path, Headers) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Method = iodata()
+</dt>
+<dd>
+<p>
+Request method.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path of the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Perform the given request.</p></div>
+<div class="paragraph"><p>This is a general purpose function that should only be used
+when existing method-specific functions don&#8217;t apply.</p></div>
+<div class="paragraph"><p>This function expects either <code>content-length</code> or <code>content-type</code>
+to be set to know a body is going to be sent afterwards.
+Gun will assume the request has no body otherwise. It is
+highly recommended to set both when possible.</p></div>
+<div class="paragraph"><p>You can use the <code>gun:data/4</code> function to send the body, if any.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_request_connpid_method_path_headers_body_8594_streamref">request(ConnPid, Method, Path, Headers, Body) &#8594; StreamRef</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Method = iodata()
+</dt>
+<dd>
+<p>
+Request method.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path of the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = iodata()
+</dt>
+<dd>
+<p>
+Body of the request.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream for this request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Perform the given request.</p></div>
+<div class="paragraph"><p>This is a general purpose function that should only be used
+when existing method-specific functions don&#8217;t apply.</p></div>
+<div class="paragraph"><p>It is highly recommended to set the <code>content-type</code> header
+to inform the server what media type the body contains.
+Gun will automatically set the <code>content-length</code> header.</p></div>
+<div class="paragraph"><p>The complete request is sent when calling this function.
+It is not possible to stream more of the body after
+calling it.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_data_connpid_streamref_isfin_data_8594_ok">data(ConnPid, StreamRef, IsFin, Data) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream this data belongs to.
+</p>
+</dd>
+<dt class="hdlist1">
+IsFin = fin | nofin
+</dt>
+<dd>
+<p>
+Whether this message terminates the request.
+</p>
+</dd>
+<dt class="hdlist1">
+Data = iodata()
+</dt>
+<dd>
+<p>
+Data to be sent with the request.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Stream the body of a request.</p></div>
+<div class="paragraph"><p>@todo empty chunks</p></div>
+<div class="paragraph"><p>This function can only be used if the request identified by
+<code>StreamRef</code> came with headers indicating the presence of a
+body and that body not being given when creating the request.</p></div>
+<div class="paragraph"><p>All calls to this function must use <code>nofin</code> except for the
+last which must use <code>fin</code> to indicate the end of the request
+body.</p></div>
+<div class="paragraph"><p>Empty data is allowed regardless of the value of <code>IsFin</code>.
+Gun will not send empty data chunks unless required to
+indicate the request body is finished, however.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_connpid_streamref_8594_await_connpid_streamref_5000_monitorref">await(ConnPid, StreamRef) &#8594; await(ConnPid, StreamRef, 5000, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await/4</code>.</p></div>
+<div class="paragraph"><p>A monitor <code>MonitorRef</code> is automatically created for the duration of
+this call and an error will be returned if the Gun connection process
+terminates.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_connpid_streamref_monitorref_8594_await_connpid_streamref_5000_monitorref">await(ConnPid, StreamRef, MonitorRef) &#8594; await(ConnPid, StreamRef, 5000, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await/4</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_connpid_streamref_timeout_8594_await_connpid_streamref_timeout_monitorref">await(ConnPid, StreamRef, Timeout) &#8594; await(ConnPid, StreamRef, Timeout, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await/4</code>.</p></div>
+<div class="paragraph"><p>A monitor <code>MonitorRef</code> is automatically created for the duration of
+this call and an error will be returned if the Gun connection process
+terminates.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_connpid_streamref_timeout_monitorref_8594_tuple_8201_8212_8201_see_below">await(ConnPid, StreamRef, Timeout, MonitorRef) &#8594; tuple()&#8201;&#8212;&#8201;see below</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream to await messages from.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+How long this function will wait for messages.
+</p>
+</dd>
+<dt class="hdlist1">
+MonitorRef = reference()
+</dt>
+<dd>
+<p>
+Monitor reference for the Gun connection process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Wait for a response message.</p></div>
+<div class="paragraph"><p>This function can be used when a synchronous handling of
+responses is desired. It will only return when a message
+for the given stream is received, on error or on timeout.</p></div>
+<div class="paragraph"><p>The return values are described in the next few subsections.</p></div>
+<div class="sect3">
+<h4 id="_response_isfin_status_headers">{response, IsFin, Status, Headers}</h4>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+IsFin = fin | nofin
+</dt>
+<dd>
+<p>
+Whether this message terminates the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Status = binary()
+</dt>
+<dd>
+<p>
+Status line for the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), binary()}]
+</dt>
+<dd>
+<p>
+Headers sent with the response.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Equivalent of a <code>gun_response</code> message.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_data_isfin_data">{data, IsFin, Data}</h4>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+IsFin = fin | nofin
+</dt>
+<dd>
+<p>
+Whether this message terminates the response.
+</p>
+</dd>
+<dt class="hdlist1">
+Data = binary()
+</dt>
+<dd>
+<p>
+Data from the stream.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Equivalent of a <code>gun_data</code> message.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_push_newstreamref_uri_headers">{push, NewStreamRef, URI, Headers}</h4>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+NewStreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream being pushed.
+</p>
+</dd>
+<dt class="hdlist1">
+URI = binary()
+</dt>
+<dd>
+<p>
+URI of the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), binary()}]
+</dt>
+<dd>
+<p>
+Headers @todo
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Equivalent of a <code>gun_push</code> message.</p></div>
+<div class="paragraph"><p>@todo Same changes as gun_push</p></div>
+</div>
+<div class="sect3">
+<h4 id="_error_reason">{error, Reason}</h4>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Error reason. @todo any?
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Equivalent of a <code>gun_error</code> message.</p></div>
+<div class="paragraph"><p>@todo I think we want to distinguish a stream error, a general error,
+@todo a DOWN and a timeout error</p></div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_await_body_connpid_streamref_8594_await_body_connpid_streamref_5000_monitorref">await_body(ConnPid, StreamRef) &#8594; await_body(ConnPid, StreamRef, 5000, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await_body/4</code>.</p></div>
+<div class="paragraph"><p>A monitor <code>MonitorRef</code> is automatically created for the duration of
+this call and an error will be returned if the Gun connection process
+terminates.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_body_connpid_streamref_monitorref_8594_await_body_connpid_streamref_5000_monitorref">await_body(ConnPid, StreamRef, MonitorRef) &#8594; await_body(ConnPid, StreamRef, 5000, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await_body/4</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_body_connpid_streamref_timeout_8594_await_body_connpid_streamref_timeout_monitorref">await_body(ConnPid, StreamRef, Timeout) &#8594; await_body(ConnPid, StreamRef, Timeout, MonitorRef)</h3>
+<div class="paragraph"><p>Alias of <code>gun:await_body/4</code>.</p></div>
+<div class="paragraph"><p>A monitor <code>MonitorRef</code> is automatically created for the duration of
+this call and an error will be returned if the Gun connection process
+terminates.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_await_body_connpid_streamref_timeout_monitorref_8594_ok_body_error_reason">await_body(ConnPid, StreamRef, Timeout, MonitorRef) &#8594; {ok, Body} | {error, Reason}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream to await messages from.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+How long this function will wait for each message.
+</p>
+</dd>
+<dt class="hdlist1">
+MonitorRef = reference()
+</dt>
+<dd>
+<p>
+Monitor reference for the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Body = binary()
+</dt>
+<dd>
+<p>
+Body for the given stream.
+</p>
+</dd>
+<dt class="hdlist1">
+Reason = any()
+</dt>
+<dd>
+<p>
+Error reason. @todo any?
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Wait for a response body.</p></div>
+<div class="paragraph"><p>This function can be used when a synchronous handling of
+responses is desired. It will only return when it has
+finished fetching the entire response body.</p></div>
+<div class="paragraph"><p>The timeout value is <strong>per message</strong>. The actual function call
+can last much longer for large bodies.</p></div>
+<div class="paragraph"><p>@todo I think we want to distinguish a stream error, a general error,
+@todo a DOWN and a timeout error</p></div>
+<div class="paragraph"><p>@todo guide might be a little incorrect about await/await_body</p></div>
+</div>
+<div class="sect2">
+<h3 id="_flush_connpid_8594_ok">flush(ConnPid) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Flush all messages from the Gun connection process from the mailbox.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_flush_streamref_8594_ok">flush(StreamRef) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Stream identifier.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Flush all messages related to the given stream.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_cancel_connpid_streamref_8594_ok">cancel(ConnPid, StreamRef) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+StreamRef = reference()
+</dt>
+<dd>
+<p>
+Identifier of the stream to cancel.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Cancel the given stream.</p></div>
+<div class="paragraph"><p>HTTP/1.1 streams can&#8217;t be cancelled. Gun will simply silence
+the stream and stop relaying messages.</p></div>
+<div class="paragraph"><p>@todo Depending on the length
+@todo of a response Gun may also attempt to reconnect rather than
+@todo receive the entire response body.</p></div>
+<div class="paragraph"><p>SPDY streams can however be cancelled at any time.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_ws_upgrade_connpid_path_8594_ws_upgrade_connpid_path">ws_upgrade(ConnPid, Path) &#8594; ws_upgrade(ConnPid, Path, [], #{})</h3>
+<div class="paragraph"><p>Alias of <code>gun:ws_upgrade/3</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_ws_upgrade_connpid_path_headers_8594_ok">ws_upgrade(ConnPid, Path, Headers) &#8594; ok</h3>
+<div class="paragraph"><p>Similar to <code>gun:ws_upgrade/4</code>, except <code>WsOpts</code> is taken from
+the options given in the <code>gun:open/{2,3}</code> call when opening
+the connection.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_ws_upgrade_connpid_path_headers_wsopts_8594_ok">ws_upgrade(ConnPid, Path, Headers, WsOpts) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Path = iodata()
+</dt>
+<dd>
+<p>
+Path to the resource.
+</p>
+</dd>
+<dt class="hdlist1">
+Headers = [{binary(), iodata()}]
+</dt>
+<dd>
+<p>
+Additional request headers.
+</p>
+</dd>
+<dt class="hdlist1">
+WsOpts = map()
+</dt>
+<dd>
+<p>
+Options for the Websocket connection.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Request the connection to be upgraded to the Websocket protocol.</p></div>
+<div class="paragraph"><p>This function can only be used when the current protocol is <code>http</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_ws_send_connpid_frames_8594_ok">ws_send(ConnPid, Frames) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ConnPid = pid()
+</dt>
+<dd>
+<p>
+The pid of the Gun connection process.
+</p>
+</dd>
+<dt class="hdlist1">
+Frames = @todo
+</dt>
+<dd>
+<p>
+@todo
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send one or more Websocket frames.</p></div>
+<div class="paragraph"><p>This function can only be used following a successful <code>ws_upgrade</code> call.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/manual">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/manual/gun_app/index.html b/docs/en/gun/1.0/manual/gun_app/index.html
new file mode 100644
index 00000000..2d5404b3
--- /dev/null
+++ b/docs/en/gun/1.0/manual/gun_app/index.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: gun(7)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>gun(7)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>gun - Erlang HTTP client with support for HTTP/1.1, SPDY and Websocket.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependencies">Dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>gun</code> application uses the Erlang applications <code>ranch</code>
+for abstracting TCP and TLS over a common interface, and
+the <code>ssl</code> application for TLS support, required for HTTPS
+and SPDY support. In addition, Gun requires the <code>crypto</code>
+application (a dependency of <code>ssl</code>) for Websocket.</p></div>
+<div class="paragraph"><p>These dependencies must be started for the <code>gun</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>gun</code>
+application is started.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_environment">Environment</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>gun</code> application does not define any application
+environment configuration parameters.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/manual">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/1.0/manual/index.html b/docs/en/gun/1.0/manual/index.html
new file mode 100644
index 00000000..d919d90c
--- /dev/null
+++ b/docs/en/gun/1.0/manual/index.html
@@ -0,0 +1,152 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Gun Function Reference</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Gun Function Reference</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="gun_app">gun(7)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="gun">gun(3)</a>
+</p>
+</li>
+</ul></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Gun
+ 1.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/gun/1.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/gun/1.0/manual">1.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/gun/index.html b/docs/en/gun/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/gun/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/index.html b/docs/en/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/ranch/1.2/guide/embedded.asciidoc b/docs/en/ranch/1.2/guide/embedded.asciidoc
new file mode 100644
index 00000000..593a8079
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/embedded.asciidoc
@@ -0,0 +1,48 @@
+== Embedded mode
+
+Embedded mode allows you to insert Ranch listeners directly
+in your supervision tree. This allows for greater fault tolerance
+control by permitting the shutdown of a listener due to the
+failure of another part of the application and vice versa.
+
+=== Embedding
+
+To embed Ranch in your application you can simply add the child specs
+to your supervision tree. This can all be done in the `init/1` function
+of one of your application supervisors.
+
+Ranch requires at the minimum two kinds of child specs for embedding.
+First, you need to add `ranch_sup` to your supervision tree, only once,
+regardless of the number of listeners you will use. Then you need to
+add the child specs for each listener.
+
+Ranch has a convenience function for getting the listeners child specs
+called `ranch:child_spec/6`, that works like `ranch:start_listener/6`,
+except that it doesn't start anything, it only returns child specs.
+
+As for `ranch_sup`, the child spec is simple enough to not require a
+convenience function.
+
+The following example adds both `ranch_sup` and one listener to another
+application's supervision tree.
+
+.Embed Ranch directly in your supervision tree
+
+[source,erlang]
+----
+init([]) ->
+ RanchSupSpec = {ranch_sup, {ranch_sup, start_link, []},
+ permanent, 5000, supervisor, [ranch_sup]},
+ ListenerSpec = ranch:child_spec(echo, 100,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+ ),
+ {ok, {{one_for_one, 10, 10}, [RanchSupSpec, ListenerSpec]}}.
+----
+
+Remember, you can add as many listener child specs as needed, but only
+one `ranch_sup` spec!
+
+It is recommended that your architecture makes sure that all listeners
+are restarted if `ranch_sup` fails. See the Ranch internals chapter for
+more details on how Ranch does it.
diff --git a/docs/en/ranch/1.2/guide/embedded/index.html b/docs/en/ranch/1.2/guide/embedded/index.html
new file mode 100644
index 00000000..e8cd3eca
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/embedded/index.html
@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Embedded mode</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Embedded mode</span></h1>
+
+<div class="paragraph"><p>Embedded mode allows you to insert Ranch listeners directly
+in your supervision tree. This allows for greater fault tolerance
+control by permitting the shutdown of a listener due to the
+failure of another part of the application and vice versa.</p></div>
+<div class="sect1">
+<h2 id="_embedding">Embedding</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To embed Ranch in your application you can simply add the child specs
+to your supervision tree. This can all be done in the <code>init/1</code> function
+of one of your application supervisors.</p></div>
+<div class="paragraph"><p>Ranch requires at the minimum two kinds of child specs for embedding.
+First, you need to add <code>ranch_sup</code> to your supervision tree, only once,
+regardless of the number of listeners you will use. Then you need to
+add the child specs for each listener.</p></div>
+<div class="paragraph"><p>Ranch has a convenience function for getting the listeners child specs
+called <code>ranch:child_spec/6</code>, that works like <code>ranch:start_listener/6</code>,
+except that it doesn&#8217;t start anything, it only returns child specs.</p></div>
+<div class="paragraph"><p>As for <code>ranch_sup</code>, the child spec is simple enough to not require a
+convenience function.</p></div>
+<div class="paragraph"><p>The following example adds both <code>ranch_sup</code> and one listener to another
+application&#8217;s supervision tree.</p></div>
+<div class="listingblock">
+<div class="title">Embed Ranch directly in your supervision tree</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>([]) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">RanchSupSpec</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">ranch_sup</span>, {<span style="color: #FF6600">ranch_sup</span>, <span style="color: #FF6600">start_link</span>, []},
+ <span style="color: #FF6600">permanent</span>, <span style="color: #993399">5000</span>, <span style="color: #FF6600">supervisor</span>, [<span style="color: #FF6600">ranch_sup</span>]},
+ <span style="color: #009900">ListenerSpec</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:child_spec</span></span>(<span style="color: #FF6600">echo</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
+ <span style="color: #FF6600">echo_protocol</span>, []
+ ),
+ {<span style="color: #FF6600">ok</span>, {{<span style="color: #FF6600">one_for_one</span>, <span style="color: #993399">10</span>, <span style="color: #993399">10</span>}, [<span style="color: #009900">RanchSupSpec</span>, <span style="color: #009900">ListenerSpec</span>]}}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Remember, you can add as many listener child specs as needed, but only
+one <code>ranch_sup</code> spec!</p></div>
+<div class="paragraph"><p>It is recommended that your architecture makes sure that all listeners
+are restarted if <code>ranch_sup</code> fails. See the Ranch internals chapter for
+more details on how Ranch does it.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/index.html b/docs/en/ranch/1.2/guide/index.html
new file mode 100644
index 00000000..cb3d49c1
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/index.html
@@ -0,0 +1,182 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Ranch User Guide</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Ranch User Guide</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="introduction/">Introduction</a>
+</p>
+</li>
+<li>
+<p>
+<a href="listeners/">Listeners</a>
+</p>
+</li>
+<li>
+<p>
+<a href="transports/">Transports</a>
+</p>
+</li>
+<li>
+<p>
+<a href="protocols/">Protocols</a>
+</p>
+</li>
+<li>
+<p>
+<a href="embedded/">Embedded mode</a>
+</p>
+</li>
+<li>
+<p>
+<a href="parsers/">Writing parsers</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ssl_auth/">SSL client authentication</a>
+</p>
+</li>
+<li>
+<p>
+<a href="internals/">Internals</a>
+</p>
+</li>
+</ul></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/internals.asciidoc b/docs/en/ranch/1.2/guide/internals.asciidoc
new file mode 100644
index 00000000..fa63f1d3
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/internals.asciidoc
@@ -0,0 +1,94 @@
+== Internals
+
+This chapter may not apply to embedded Ranch as embedding allows you
+to use an architecture specific to your application, which may or may
+not be compatible with the description of the Ranch application.
+
+Note that for everything related to efficiency and performance,
+you should perform the benchmarks yourself to get the numbers that
+matter to you. Generic benchmarks found on the web may or may not
+be of use to you, you can never know until you benchmark your own
+system.
+
+=== Architecture
+
+Ranch is an OTP application.
+
+Like all OTP applications, Ranch has a top supervisor. It is responsible
+for supervising the `ranch_server` process and all the listeners that
+will be started.
+
+The `ranch_server` gen_server is a central process keeping track of the
+listeners and their acceptors. It does so through the use of a public ets
+table called `ranch_server`. The table is owned by the top supervisor
+to improve fault tolerance. This way if the `ranch_server` gen_server
+fails, it doesn't lose any information and the restarted process can
+continue as if nothing happened.
+
+Ranch uses a custom supervisor for managing connections. This supervisor
+keeps track of the number of connections and handles connection limits
+directly. While it is heavily optimized to perform the task of creating
+connection processes for accepted connections, it is still following the
+OTP principles and the usual `sys` and `supervisor` calls will work on
+it as expected.
+
+Listeners are grouped into the `ranch_listener_sup` supervisor and
+consist of three kinds of processes: the listener gen_server, the
+acceptor processes and the connection processes, both grouped under
+their own supervisor. All of these processes are registered to the
+`ranch_server` gen_server with varying amount of information.
+
+All socket operations, including listening for connections, go through
+transport handlers. Accepted connections are given to the protocol handler.
+Transport handlers are simple callback modules for performing operations on
+sockets. Protocol handlers start a new process, which receives socket
+ownership, with no requirements on how the code should be written inside
+that new process.
+
+=== Number of acceptors
+
+The second argument to `ranch:start_listener/6` is the number of
+processes that will be accepting connections. Care should be taken
+when choosing this number.
+
+First of all, it should not be confused with the maximum number
+of connections. Acceptor processes are only used for accepting and
+have nothing else in common with connection processes. Therefore
+there is nothing to be gained from setting this number too high,
+in fact it can slow everything else down.
+
+Second, this number should be high enough to allow Ranch to accept
+connections concurrently. But the number of cores available doesn't
+seem to be the only factor for choosing this number, as we can
+observe faster accepts if we have more acceptors than cores. It
+might be entirely dependent on the protocol, however.
+
+Our observations suggest that using 100 acceptors on modern hardware
+is a good solution, as it's big enough to always have acceptors ready
+and it's low enough that it doesn't have a negative impact on the
+system's performances.
+
+=== Platform-specific TCP features
+
+Some socket options are platform-specific and not supported by `inet`.
+They can be of interest because they generally are related to
+optimizations provided by the underlying OS. They can still be enabled
+thanks to the `raw` option, for which we will see an example.
+
+One of these features is `TCP_DEFER_ACCEPT` on Linux. It is a simplified
+accept mechanism which will wait for application data to come in before
+handing out the connection to the Erlang process.
+
+This is especially useful if you expect many connections to be mostly
+idle, perhaps part of a connection pool. They can be handled by the
+kernel directly until they send any real data, instead of allocating
+resources to idle connections.
+
+To enable this mechanism, the following option can be used.
+
+.Using raw transport options
+
+[source,erlang]
+{raw, 6, 9, << 30:32/native >>}
+
+It means go on layer 6, turn on option 9 with the given integer parameter.
diff --git a/docs/en/ranch/1.2/guide/internals/index.html b/docs/en/ranch/1.2/guide/internals/index.html
new file mode 100644
index 00000000..bd7610c7
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/internals/index.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Internals</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Internals</span></h1>
+
+<div class="paragraph"><p>This chapter may not apply to embedded Ranch as embedding allows you
+to use an architecture specific to your application, which may or may
+not be compatible with the description of the Ranch application.</p></div>
+<div class="paragraph"><p>Note that for everything related to efficiency and performance,
+you should perform the benchmarks yourself to get the numbers that
+matter to you. Generic benchmarks found on the web may or may not
+be of use to you, you can never know until you benchmark your own
+system.</p></div>
+<div class="sect1">
+<h2 id="_architecture">Architecture</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch is an OTP application.</p></div>
+<div class="paragraph"><p>Like all OTP applications, Ranch has a top supervisor. It is responsible
+for supervising the <code>ranch_server</code> process and all the listeners that
+will be started.</p></div>
+<div class="paragraph"><p>The <code>ranch_server</code> gen_server is a central process keeping track of the
+listeners and their acceptors. It does so through the use of a public ets
+table called <code>ranch_server</code>. The table is owned by the top supervisor
+to improve fault tolerance. This way if the <code>ranch_server</code> gen_server
+fails, it doesn&#8217;t lose any information and the restarted process can
+continue as if nothing happened.</p></div>
+<div class="paragraph"><p>Ranch uses a custom supervisor for managing connections. This supervisor
+keeps track of the number of connections and handles connection limits
+directly. While it is heavily optimized to perform the task of creating
+connection processes for accepted connections, it is still following the
+OTP principles and the usual <code>sys</code> and <code>supervisor</code> calls will work on
+it as expected.</p></div>
+<div class="paragraph"><p>Listeners are grouped into the <code>ranch_listener_sup</code> supervisor and
+consist of three kinds of processes: the listener gen_server, the
+acceptor processes and the connection processes, both grouped under
+their own supervisor. All of these processes are registered to the
+<code>ranch_server</code> gen_server with varying amount of information.</p></div>
+<div class="paragraph"><p>All socket operations, including listening for connections, go through
+transport handlers. Accepted connections are given to the protocol handler.
+Transport handlers are simple callback modules for performing operations on
+sockets. Protocol handlers start a new process, which receives socket
+ownership, with no requirements on how the code should be written inside
+that new process.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_number_of_acceptors">Number of acceptors</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The second argument to <code>ranch:start_listener/6</code> is the number of
+processes that will be accepting connections. Care should be taken
+when choosing this number.</p></div>
+<div class="paragraph"><p>First of all, it should not be confused with the maximum number
+of connections. Acceptor processes are only used for accepting and
+have nothing else in common with connection processes. Therefore
+there is nothing to be gained from setting this number too high,
+in fact it can slow everything else down.</p></div>
+<div class="paragraph"><p>Second, this number should be high enough to allow Ranch to accept
+connections concurrently. But the number of cores available doesn&#8217;t
+seem to be the only factor for choosing this number, as we can
+observe faster accepts if we have more acceptors than cores. It
+might be entirely dependent on the protocol, however.</p></div>
+<div class="paragraph"><p>Our observations suggest that using 100 acceptors on modern hardware
+is a good solution, as it&#8217;s big enough to always have acceptors ready
+and it&#8217;s low enough that it doesn&#8217;t have a negative impact on the
+system&#8217;s performances.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_platform_specific_tcp_features">Platform-specific TCP features</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Some socket options are platform-specific and not supported by <code>inet</code>.
+They can be of interest because they generally are related to
+optimizations provided by the underlying OS. They can still be enabled
+thanks to the <code>raw</code> option, for which we will see an example.</p></div>
+<div class="paragraph"><p>One of these features is <code>TCP_DEFER_ACCEPT</code> on Linux. It is a simplified
+accept mechanism which will wait for application data to come in before
+handing out the connection to the Erlang process.</p></div>
+<div class="paragraph"><p>This is especially useful if you expect many connections to be mostly
+idle, perhaps part of a connection pool. They can be handled by the
+kernel directly until they send any real data, instead of allocating
+resources to idle connections.</p></div>
+<div class="paragraph"><p>To enable this mechanism, the following option can be used.</p></div>
+<div class="listingblock">
+<div class="title">Using raw transport options</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">raw</span>, <span style="color: #993399">6</span>, <span style="color: #993399">9</span>, <span style="color: #990000">&lt;&lt;</span> <span style="font-weight: bold"><span style="color: #000000">30:32</span></span><span style="color: #990000">/</span><span style="color: #FF6600">native</span> <span style="color: #990000">&gt;&gt;</span>}</tt></pre></div></div>
+<div class="paragraph"><p>It means go on layer 6, turn on option 9 with the given integer parameter.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/introduction.asciidoc b/docs/en/ranch/1.2/guide/introduction.asciidoc
new file mode 100644
index 00000000..3199fb2f
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/introduction.asciidoc
@@ -0,0 +1,25 @@
+== Introduction
+
+Ranch is a socket acceptor pool for TCP protocols.
+
+Ranch aims to provide everything you need to accept TCP connections
+with a small code base and low latency while being easy to use directly
+as an application or to embed into your own.
+
+=== Prerequisites
+
+It is assumed the developer already knows Erlang and has some experience
+with socket programming and TCP protocols.
+
+=== Supported platforms
+
+Ranch is tested and supported on Linux.
+
+Ranch is developed for Erlang R15B01+.
+
+Ranch may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as expected.
+
+=== Versioning
+
+Ranch uses http://semver.org/[Semantic Versioning 2.0.0]
diff --git a/docs/en/ranch/1.2/guide/introduction/index.html b/docs/en/ranch/1.2/guide/introduction/index.html
new file mode 100644
index 00000000..2a6d275c
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/introduction/index.html
@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Introduction</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Introduction</span></h1>
+
+<div class="paragraph"><p>Ranch is a socket acceptor pool for TCP protocols.</p></div>
+<div class="paragraph"><p>Ranch aims to provide everything you need to accept TCP connections
+with a small code base and low latency while being easy to use directly
+as an application or to embed into your own.</p></div>
+<div class="sect1">
+<h2 id="_prerequisites">Prerequisites</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It is assumed the developer already knows Erlang and has some experience
+with socket programming and TCP protocols.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_supported_platforms">Supported platforms</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch is tested and supported on Linux.</p></div>
+<div class="paragraph"><p>Ranch is developed for Erlang R15B01+.</p></div>
+<div class="paragraph"><p>Ranch may be compiled on earlier Erlang versions with small source code
+modifications but there is no guarantee that it will work as expected.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_versioning">Versioning</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch uses <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/listeners.asciidoc b/docs/en/ranch/1.2/guide/listeners.asciidoc
new file mode 100644
index 00000000..ef2d49c7
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/listeners.asciidoc
@@ -0,0 +1,251 @@
+== Listeners
+
+A listener is a set of processes whose role is to listen on a port
+for new connections. It manages a pool of acceptor processes, each
+of them indefinitely accepting connections. When it does, it starts
+a new process executing the protocol handler code. All the socket
+programming is abstracted through the user of transport handlers.
+
+The listener takes care of supervising all the acceptor and connection
+processes, allowing developers to focus on building their application.
+
+=== Starting a listener
+
+Ranch does nothing by default. It is up to the application developer
+to request that Ranch listens for connections.
+
+A listener can be started and stopped at will.
+
+When starting a listener, a number of different settings are required:
+
+* A name to identify it locally and be able to interact with it.
+* The number of acceptors in the pool.
+* A transport handler and its associated options.
+* A protocol handler and its associated options.
+
+Ranch includes both TCP and SSL transport handlers, respectively
+`ranch_tcp` and `ranch_ssl`.
+
+A listener can be started by calling the `ranch:start_listener/6`
+function. Before doing so however, you must ensure that the `ranch`
+application is started.
+
+.Starting the Ranch application
+
+[source,erlang]
+ok = application:start(ranch).
+
+You are then ready to start a listener. Let's call it `tcp_echo`. It will
+have a pool of 100 acceptors, use a TCP transport and forward connections
+to the `echo_protocol` handler.
+
+.Starting a listener for TCP connections on port 5555
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo, 100,
+ ranch_tcp, [{port, 5555}],
+ echo_protocol, []
+).
+
+You can try this out by compiling and running the `tcp_echo` example in the
+examples directory. To do so, open a shell in the 'examples/tcp_echo/'
+directory and run the following command:
+
+.Building and starting a Ranch example
+
+[source,bash]
+$ make run
+
+You can then connect to it using telnet and see the echo server reply
+everything you send to it. Then when you're done testing, you can use
+the `Ctrl+]` key to escape to the telnet command line and type
+`quit` to exit.
+
+.Connecting to the example listener with telnet
+
+[source,bash]
+----
+$ telnet localhost 5555
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+Hello!
+Hello!
+It works!
+It works!
+^]
+
+telnet> quit
+Connection closed.
+----
+
+=== Stopping a listener
+
+All you need to stop a Ranch listener is to call the
+`ranch:stop_listener/1` function with the listener's name
+as argument. In the previous section we started the listener
+named `tcp_echo`. We can now stop it.
+
+.Stopping a listener
+
+[source,erlang]
+ranch:stop_listener(tcp_echo).
+
+=== Default transport options
+
+By default the socket will be set to return `binary` data, with the
+options `{active, false}`, `{packet, raw}`, `{reuseaddr, true}` set.
+These values can't be overriden when starting the listener, but
+they can be overriden using `Transport:setopts/2` in the protocol.
+
+It will also set `{backlog, 1024}` and `{nodelay, true}`, which
+can be overriden at listener startup.
+
+=== Listening on a random port
+
+You do not have to specify a specific port to listen on. If you give
+the port number 0, or if you omit the port number entirely, Ranch will
+start listening on a random port.
+
+You can retrieve this port number by calling `ranch:get_port/1`. The
+argument is the name of the listener you gave in `ranch:start_listener/6`.
+
+.Starting a listener for TCP connections on a random port
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo, 100,
+ ranch_tcp, [{port, 0}],
+ echo_protocol, []
+).
+Port = ranch:get_port(tcp_echo).
+
+=== Listening on privileged ports
+
+Some systems limit access to ports below 1024 for security reasons.
+This can easily be identified by an `{error, eacces}` error when trying
+to open a listening socket on such a port.
+
+The methods for listening on privileged ports vary between systems,
+please refer to your system's documentation for more information.
+
+We recommend the use of port rewriting for systems with a single server,
+and load balancing for systems with multiple servers. Documenting these
+solutions is however out of the scope of this guide.
+
+=== Accepting connections on an existing socket
+
+If you want to accept connections on an existing socket, you can use the
+`socket` transport option, which should just be the relevant data returned
+from the connect function for the transport or the underlying socket library
+(`gen_tcp:connect`, `ssl:connect`). The accept function will then be
+called on the passed in socket. You should connect the socket in
+`{active, false}` mode, as well.
+
+Note, however, that because of a bug in SSL, you cannot change ownership of an
+SSL listen socket prior to R16. Ranch will catch the error thrown, but the
+owner of the SSL socket will remain as whatever process created the socket.
+However, this will not affect accept behaviour unless the owner process dies,
+in which case the socket is closed. Therefore, to use this feature with SSL
+with an erlang release prior to R16, ensure that the SSL socket is opened in a
+persistant process.
+
+=== Limiting the number of concurrent connections
+
+The `max_connections` transport option allows you to limit the number
+of concurrent connections. It defaults to 1024. Its purpose is to
+prevent your system from being overloaded and ensuring all the
+connections are handled optimally.
+
+.Customizing the maximum number of concurrent connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo, 100,
+ ranch_tcp, [{port, 5555}, {max_connections, 100}],
+ echo_protocol, []
+).
+
+You can disable this limit by setting its value to the atom `infinity`.
+
+.Disabling the limit for the number of connections
+
+[source,erlang]
+{ok, _} = ranch:start_listener(tcp_echo, 100,
+ ranch_tcp, [{port, 5555}, {max_connections, infinity}],
+ echo_protocol, []
+).
+
+You may not always want connections to be counted when checking for
+`max_connections`. For example you might have a protocol where both
+short-lived and long-lived connections are possible. If the long-lived
+connections are mostly waiting for messages, then they don't consume
+much resources and can safely be removed from the count.
+
+To remove the connection from the count, you must call the
+`ranch:remove_connection/1` from within the connection process,
+with the name of the listener as the only argument.
+
+.Removing a connection from the count of connections
+
+[source,erlang]
+ranch:remove_connection(Ref).
+
+As seen in the chapter covering protocols, this pid is received as the
+first argument of the protocol's `start_link/4` callback.
+
+You can modify the `max_connections` value on a running listener by
+using the `ranch:set_max_connections/2` function, with the name of the
+listener as first argument and the new value as the second.
+
+.Upgrading the maximum number of connections
+
+[source,erlang]
+ranch:set_max_connections(tcp_echo, MaxConns).
+
+The change will occur immediately.
+
+=== Using a supervisor for connection processes
+
+Ranch allows you to define the type of process that will be used
+for the connection processes. By default it expects a `worker`.
+When the `connection_type` configuration value is set to `supervisor`,
+Ranch will consider that the connection process it manages is a
+supervisor and will reflect that in its supervision tree.
+
+Connection processes of type `supervisor` can either handle the
+socket directly or through one of their children. In the latter
+case the start function for the connection process must return
+two pids: the pid of the supervisor you created (that will be
+supervised) and the pid of the protocol handling process (that
+will receive the socket).
+
+Instead of returning `{ok, ConnPid}`, simply return
+`{ok, SupPid, ConnPid}`.
+
+It is very important that the connection process be created
+under the supervisor process so that everything works as intended.
+If not, you will most likely experience issues when the supervised
+process is stopped.
+
+=== Upgrading
+
+Ranch allows you to upgrade the protocol options. This takes effect
+immediately and for all subsequent connections.
+
+To upgrade the protocol options, call `ranch:set_protocol_options/2`
+with the name of the listener as first argument and the new options
+as the second.
+
+.Upgrading the protocol options
+
+[source,erlang]
+ranch:set_protocol_options(tcp_echo, NewOpts).
+
+All future connections will use the new options.
+
+You can also retrieve the current options similarly by
+calling `ranch:get_protocol_options/1`.
+
+.Retrieving the current protocol options
+
+[source,erlang]
+Opts = ranch:get_protocol_options(tcp_echo).
diff --git a/docs/en/ranch/1.2/guide/listeners/index.html b/docs/en/ranch/1.2/guide/listeners/index.html
new file mode 100644
index 00000000..638b15af
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/listeners/index.html
@@ -0,0 +1,421 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Listeners</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Listeners</span></h1>
+
+<div class="paragraph"><p>A listener is a set of processes whose role is to listen on a port
+for new connections. It manages a pool of acceptor processes, each
+of them indefinitely accepting connections. When it does, it starts
+a new process executing the protocol handler code. All the socket
+programming is abstracted through the user of transport handlers.</p></div>
+<div class="paragraph"><p>The listener takes care of supervising all the acceptor and connection
+processes, allowing developers to focus on building their application.</p></div>
+<div class="sect1">
+<h2 id="_starting_a_listener">Starting a listener</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch does nothing by default. It is up to the application developer
+to request that Ranch listens for connections.</p></div>
+<div class="paragraph"><p>A listener can be started and stopped at will.</p></div>
+<div class="paragraph"><p>When starting a listener, a number of different settings are required:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+A name to identify it locally and be able to interact with it.
+</p>
+</li>
+<li>
+<p>
+The number of acceptors in the pool.
+</p>
+</li>
+<li>
+<p>
+A transport handler and its associated options.
+</p>
+</li>
+<li>
+<p>
+A protocol handler and its associated options.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Ranch includes both TCP and SSL transport handlers, respectively
+<code>ranch_tcp</code> and <code>ranch_ssl</code>.</p></div>
+<div class="paragraph"><p>A listener can be started by calling the <code>ranch:start_listener/6</code>
+function. Before doing so however, you must ensure that the <code>ranch</code>
+application is started.</p></div>
+<div class="listingblock">
+<div class="title">Starting the Ranch application</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">application:start</span></span>(<span style="color: #FF6600">ranch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You are then ready to start a listener. Let&#8217;s call it <code>tcp_echo</code>. It will
+have a pool of 100 acceptors, use a TCP transport and forward connections
+to the <code>echo_protocol</code> handler.</p></div>
+<div class="listingblock">
+<div class="title">Starting a listener for TCP connections on port 5555</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}],
+ <span style="color: #FF6600">echo_protocol</span>, []
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can try this out by compiling and running the <code>tcp_echo</code> example in the
+examples directory. To do so, open a shell in the <em>examples/tcp_echo/</em>
+directory and run the following command:</p></div>
+<div class="listingblock">
+<div class="title">Building and starting a Ranch example</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make run</tt></pre></div></div>
+<div class="paragraph"><p>You can then connect to it using telnet and see the echo server reply
+everything you send to it. Then when you&#8217;re done testing, you can use
+the <code>Ctrl+]</code> key to escape to the telnet command line and type
+<code>quit</code> to exit.</p></div>
+<div class="listingblock">
+<div class="title">Connecting to the example listener with telnet</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ telnet localhost <span style="color: #993399">5555</span>
+Trying <span style="color: #993399">127.0</span><span style="color: #990000">.</span><span style="color: #993399">0.1</span><span style="color: #990000">...</span>
+Connected to localhost<span style="color: #990000">.</span>
+Escape character is <span style="color: #FF0000">'^]'</span><span style="color: #990000">.</span>
+Hello<span style="color: #990000">!</span>
+Hello<span style="color: #990000">!</span>
+It works<span style="color: #990000">!</span>
+It works<span style="color: #990000">!</span>
+<span style="color: #990000">^]</span>
+
+telnet<span style="color: #990000">&gt;</span> quit
+Connection closed<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_stopping_a_listener">Stopping a listener</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All you need to stop a Ranch listener is to call the
+<code>ranch:stop_listener/1</code> function with the listener&#8217;s name
+as argument. In the previous section we started the listener
+named <code>tcp_echo</code>. We can now stop it.</p></div>
+<div class="listingblock">
+<div class="title">Stopping a listener</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ranch:stop_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_default_transport_options">Default transport options</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>By default the socket will be set to return <code>binary</code> data, with the
+options <code>{active, false}</code>, <code>{packet, raw}</code>, <code>{reuseaddr, true}</code> set.
+These values can&#8217;t be overriden when starting the listener, but
+they can be overriden using <code>Transport:setopts/2</code> in the protocol.</p></div>
+<div class="paragraph"><p>It will also set <code>{backlog, 1024}</code> and <code>{nodelay, true}</code>, which
+can be overriden at listener startup.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_listening_on_a_random_port">Listening on a random port</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You do not have to specify a specific port to listen on. If you give
+the port number 0, or if you omit the port number entirely, Ranch will
+start listening on a random port.</p></div>
+<div class="paragraph"><p>You can retrieve this port number by calling <code>ranch:get_port/1</code>. The
+argument is the name of the listener you gave in <code>ranch:start_listener/6</code>.</p></div>
+<div class="listingblock">
+<div class="title">Starting a listener for TCP connections on a random port</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">0</span>}],
+ <span style="color: #FF6600">echo_protocol</span>, []
+)<span style="color: #990000">.</span>
+<span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_port</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_listening_on_privileged_ports">Listening on privileged ports</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Some systems limit access to ports below 1024 for security reasons.
+This can easily be identified by an <code>{error, eacces}</code> error when trying
+to open a listening socket on such a port.</p></div>
+<div class="paragraph"><p>The methods for listening on privileged ports vary between systems,
+please refer to your system&#8217;s documentation for more information.</p></div>
+<div class="paragraph"><p>We recommend the use of port rewriting for systems with a single server,
+and load balancing for systems with multiple servers. Documenting these
+solutions is however out of the scope of this guide.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_accepting_connections_on_an_existing_socket">Accepting connections on an existing socket</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If you want to accept connections on an existing socket, you can use the
+<code>socket</code> transport option, which should just be the relevant data returned
+from the connect function for the transport or the underlying socket library
+(<code>gen_tcp:connect</code>, <code>ssl:connect</code>). The accept function will then be
+called on the passed in socket. You should connect the socket in
+<code>{active, false}</code> mode, as well.</p></div>
+<div class="paragraph"><p>Note, however, that because of a bug in SSL, you cannot change ownership of an
+SSL listen socket prior to R16. Ranch will catch the error thrown, but the
+owner of the SSL socket will remain as whatever process created the socket.
+However, this will not affect accept behaviour unless the owner process dies,
+in which case the socket is closed. Therefore, to use this feature with SSL
+with an erlang release prior to R16, ensure that the SSL socket is opened in a
+persistant process.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_limiting_the_number_of_concurrent_connections">Limiting the number of concurrent connections</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>max_connections</code> transport option allows you to limit the number
+of concurrent connections. It defaults to 1024. Its purpose is to
+prevent your system from being overloaded and ensuring all the
+connections are handled optimally.</p></div>
+<div class="listingblock">
+<div class="title">Customizing the maximum number of concurrent connections</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #993399">100</span>}],
+ <span style="color: #FF6600">echo_protocol</span>, []
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can disable this limit by setting its value to the atom <code>infinity</code>.</p></div>
+<div class="listingblock">
+<div class="title">Disabling the limit for the number of connections</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_tcp</span>, [{<span style="color: #FF6600">port</span>, <span style="color: #993399">5555</span>}, {<span style="color: #FF6600">max_connections</span>, <span style="color: #FF6600">infinity</span>}],
+ <span style="color: #FF6600">echo_protocol</span>, []
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You may not always want connections to be counted when checking for
+<code>max_connections</code>. For example you might have a protocol where both
+short-lived and long-lived connections are possible. If the long-lived
+connections are mostly waiting for messages, then they don&#8217;t consume
+much resources and can safely be removed from the count.</p></div>
+<div class="paragraph"><p>To remove the connection from the count, you must call the
+<code>ranch:remove_connection/1</code> from within the connection process,
+with the name of the listener as the only argument.</p></div>
+<div class="listingblock">
+<div class="title">Removing a connection from the count of connections</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ranch:remove_connection</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>As seen in the chapter covering protocols, this pid is received as the
+first argument of the protocol&#8217;s <code>start_link/4</code> callback.</p></div>
+<div class="paragraph"><p>You can modify the <code>max_connections</code> value on a running listener by
+using the <code>ranch:set_max_connections/2</code> function, with the name of the
+listener as first argument and the new value as the second.</p></div>
+<div class="listingblock">
+<div class="title">Upgrading the maximum number of connections</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ranch:set_max_connections</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">MaxConns</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The change will occur immediately.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_a_supervisor_for_connection_processes">Using a supervisor for connection processes</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch allows you to define the type of process that will be used
+for the connection processes. By default it expects a <code>worker</code>.
+When the <code>connection_type</code> configuration value is set to <code>supervisor</code>,
+Ranch will consider that the connection process it manages is a
+supervisor and will reflect that in its supervision tree.</p></div>
+<div class="paragraph"><p>Connection processes of type <code>supervisor</code> can either handle the
+socket directly or through one of their children. In the latter
+case the start function for the connection process must return
+two pids: the pid of the supervisor you created (that will be
+supervised) and the pid of the protocol handling process (that
+will receive the socket).</p></div>
+<div class="paragraph"><p>Instead of returning <code>{ok, ConnPid}</code>, simply return
+<code>{ok, SupPid, ConnPid}</code>.</p></div>
+<div class="paragraph"><p>It is very important that the connection process be created
+under the supervisor process so that everything works as intended.
+If not, you will most likely experience issues when the supervised
+process is stopped.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_upgrading">Upgrading</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Ranch allows you to upgrade the protocol options. This takes effect
+immediately and for all subsequent connections.</p></div>
+<div class="paragraph"><p>To upgrade the protocol options, call <code>ranch:set_protocol_options/2</code>
+with the name of the listener as first argument and the new options
+as the second.</p></div>
+<div class="listingblock">
+<div class="title">Upgrading the protocol options</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ranch:set_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>, <span style="color: #009900">NewOpts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>All future connections will use the new options.</p></div>
+<div class="paragraph"><p>You can also retrieve the current options similarly by
+calling <code>ranch:get_protocol_options/1</code>.</p></div>
+<div class="listingblock">
+<div class="title">Retrieving the current protocol options</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Opts</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:get_protocol_options</span></span>(<span style="color: #FF6600">tcp_echo</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/parsers.asciidoc b/docs/en/ranch/1.2/guide/parsers.asciidoc
new file mode 100644
index 00000000..9eacbfa9
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/parsers.asciidoc
@@ -0,0 +1,92 @@
+== Writing parsers
+
+There are three kinds of protocols:
+
+* Text protocols
+* Schema-less binary protocols
+* Schema-based binary protocols
+
+This chapter introduces the first two kinds. It will not cover
+more advanced topics such as continuations or parser generators.
+
+This chapter isn't specifically about Ranch, we assume here that
+you know how to read data from the socket. The data you read and
+the data that hasn't been parsed is saved in a buffer. Every
+time you read from the socket, the data read is appended to the
+buffer. What happens next depends on the kind of protocol. We
+will only cover the first two.
+
+=== Parsing text
+
+Text protocols are generally line based. This means that we can't
+do anything with them until we receive the full line.
+
+A simple way to get a full line is to use `binary:split/{2,3}`.
+
+.Using binary:split/2 to get a line of input
+
+[source,erlang]
+case binary:split(Buffer, <<"\n">>) of
+ [_] ->
+ get_more_data(Buffer);
+ [Line, Rest] ->
+ handle_line(Line, Rest)
+end.
+
+In the above example, we can have two results. Either there was
+a line break in the buffer and we get it split into two parts,
+the line and the rest of the buffer; or there was no line break
+in the buffer and we need to get more data from the socket.
+
+Next, we need to parse the line. The simplest way is to again
+split, here on space. The difference is that we want to split
+on all spaces character, as we want to tokenize the whole string.
+
+.Using binary:split/3 to split text
+
+[source,erlang]
+case binary:split(Line, <<" ">>, [global]) of
+ [<<"HELLO">>] ->
+ be_polite();
+ [<<"AUTH">>, User, Password] ->
+ authenticate_user(User, Password);
+ [<<"QUIT">>, Reason] ->
+ quit(Reason)
+ %% ...
+end.
+
+Pretty simple, right? Match on the command name, get the rest
+of the tokens in variables and call the respective functions.
+
+After doing this, you will want to check if there is another
+line in the buffer, and handle it immediately if any.
+Otherwise wait for more data.
+
+=== Parsing binary
+
+Binary protocols can be more varied, although most of them are
+pretty similar. The first four bytes of a frame tend to be
+the size of the frame, which is followed by a certain number
+of bytes for the type of frame and then various parameters.
+
+Sometimes the size of the frame includes the first four bytes,
+sometimes not. Other times this size is encoded over two bytes.
+And even other times little-endian is used instead of big-endian.
+
+The general idea stays the same though.
+
+.Using binary pattern matching to split frames
+
+[source,erlang]
+<< Size:32, _/bits >> = Buffer,
+case Buffer of
+ << Frame:Size/binary, Rest/bits >> ->
+ handle_frame(Frame, Rest);
+ _ ->
+ get_more_data(Buffer)
+end.
+
+You will then need to parse this frame using binary pattern
+matching, and handle it. Then you will want to check if there
+is another frame fully received in the buffer, and handle it
+immediately if any. Otherwise wait for more data.
diff --git a/docs/en/ranch/1.2/guide/parsers/index.html b/docs/en/ranch/1.2/guide/parsers/index.html
new file mode 100644
index 00000000..364cd757
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/parsers/index.html
@@ -0,0 +1,243 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Writing parsers</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Writing parsers</span></h1>
+
+<div class="paragraph"><p>There are three kinds of protocols:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Text protocols
+</p>
+</li>
+<li>
+<p>
+Schema-less binary protocols
+</p>
+</li>
+<li>
+<p>
+Schema-based binary protocols
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>This chapter introduces the first two kinds. It will not cover
+more advanced topics such as continuations or parser generators.</p></div>
+<div class="paragraph"><p>This chapter isn&#8217;t specifically about Ranch, we assume here that
+you know how to read data from the socket. The data you read and
+the data that hasn&#8217;t been parsed is saved in a buffer. Every
+time you read from the socket, the data read is appended to the
+buffer. What happens next depends on the kind of protocol. We
+will only cover the first two.</p></div>
+<div class="sect1">
+<h2 id="_parsing_text">Parsing text</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Text protocols are generally line based. This means that we can&#8217;t
+do anything with them until we receive the full line.</p></div>
+<div class="paragraph"><p>A simple way to get a full line is to use <code>binary:split/{2,3}</code>.</p></div>
+<div class="listingblock">
+<div class="title">Using binary:split/2 to get a line of input</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Buffer</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"\n"</span><span style="color: #990000">&gt;&gt;</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ [<span style="color: #990000">_</span>] <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>);
+ [<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>] <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">handle_line</span></span>(<span style="color: #009900">Line</span>, <span style="color: #009900">Rest</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>In the above example, we can have two results. Either there was
+a line break in the buffer and we get it split into two parts,
+the line and the rest of the buffer; or there was no line break
+in the buffer and we need to get more data from the socket.</p></div>
+<div class="paragraph"><p>Next, we need to parse the line. The simplest way is to again
+split, here on space. The difference is that we want to split
+on all spaces character, as we want to tokenize the whole string.</p></div>
+<div class="listingblock">
+<div class="title">Using binary:split/3 to split text</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">binary:split</span></span>(<span style="color: #009900">Line</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">" "</span><span style="color: #990000">&gt;&gt;</span>, [<span style="color: #FF6600">global</span>]) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"HELLO"</span><span style="color: #990000">&gt;&gt;</span>] <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">be_polite</span></span>();
+ [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"AUTH"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">User</span>, <span style="color: #009900">Password</span>] <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">authenticate_user</span></span>(<span style="color: #009900">User</span>, <span style="color: #009900">Password</span>);
+ [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"QUIT"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Reason</span>] <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">quit</span></span>(<span style="color: #009900">Reason</span>)
+ <span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span>
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Pretty simple, right? Match on the command name, get the rest
+of the tokens in variables and call the respective functions.</p></div>
+<div class="paragraph"><p>After doing this, you will want to check if there is another
+line in the buffer, and handle it immediately if any.
+Otherwise wait for more data.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_parsing_binary">Parsing binary</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Binary protocols can be more varied, although most of them are
+pretty similar. The first four bytes of a frame tend to be
+the size of the frame, which is followed by a certain number
+of bytes for the type of frame and then various parameters.</p></div>
+<div class="paragraph"><p>Sometimes the size of the frame includes the first four bytes,
+sometimes not. Other times this size is encoded over two bytes.
+And even other times little-endian is used instead of big-endian.</p></div>
+<div class="paragraph"><p>The general idea stays the same though.</p></div>
+<div class="listingblock">
+<div class="title">Using binary pattern matching to split frames</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Size</span><span style="color: #990000">:</span><span style="color: #993399">32</span>, <span style="color: #990000">_/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=</span> <span style="color: #009900">Buffer</span>,
+<span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Buffer</span> <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ <span style="color: #990000">&lt;&lt;</span> <span style="color: #009900">Frame</span><span style="color: #990000">:</span><span style="color: #009900">Size</span><span style="color: #990000">/</span><span style="font-weight: bold"><span style="color: #000080">binary</span></span>, <span style="color: #009900">Rest</span><span style="color: #990000">/</span><span style="color: #FF6600">bits</span> <span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">handle_frame</span></span>(<span style="color: #009900">Frame</span>, <span style="color: #009900">Rest</span>);
+ <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">get_more_data</span></span>(<span style="color: #009900">Buffer</span>)
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You will then need to parse this frame using binary pattern
+matching, and handle it. Then you will want to check if there
+is another frame fully received in the buffer, and handle it
+immediately if any. Otherwise wait for more data.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/protocols.asciidoc b/docs/en/ranch/1.2/guide/protocols.asciidoc
new file mode 100644
index 00000000..80603432
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/protocols.asciidoc
@@ -0,0 +1,125 @@
+== Protocols
+
+A protocol handler starts a connection process and defines the
+protocol logic executed in this process.
+
+=== Writing a protocol handler
+
+All protocol handlers must implement the `ranch_protocol` behavior
+which defines a single callback, `start_link/4`. This callback is
+responsible for spawning a new process for handling the connection.
+It receives four arguments: the name of the listener, the socket, the
+transport handler being used and the protocol options defined in
+the call to `ranch:start_listener/6`. This callback must
+return `{ok, Pid}`, with `Pid` the pid of the new process.
+
+The newly started process can then freely initialize itself. However,
+it must call `ranch:accept_ack/1` before doing any socket operation.
+This will ensure the connection process is the owner of the socket.
+It expects the listener's name as argument.
+
+.Acknowledge accepting the socket
+
+[source,erlang]
+ok = ranch:accept_ack(Ref).
+
+If your protocol code requires specific socket options, you should
+set them while initializing your connection process, after
+calling `ranch:accept_ack/1`. You can use `Transport:setopts/2`
+for that purpose.
+
+Following is the complete protocol code for the example found
+in `examples/tcp_echo/`.
+
+.Protocol module that echoes everything it receives
+
+[source,erlang]
+----
+-module(echo_protocol).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/4]).
+
+start_link(Ref, Socket, Transport, Opts) ->
+ Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
+ {ok, Pid}.
+
+init(Ref, Socket, Transport, _Opts = []) ->
+ ok = ranch:accept_ack(Ref),
+ loop(Socket, Transport).
+
+loop(Socket, Transport) ->
+ case Transport:recv(Socket, 0, 5000) of
+ {ok, Data} ->
+ Transport:send(Socket, Data),
+ loop(Socket, Transport);
+ _ ->
+ ok = Transport:close(Socket)
+ end.
+----
+
+=== Using gen_server
+
+Special processes like the ones that use the `gen_server` or `gen_fsm`
+behaviours have the particularity of having their `start_link` call not
+return until the `init` function returns. This is problematic, because
+you won't be able to call `ranch:accept_ack/1` from the `init` callback
+as this would cause a deadlock to happen.
+
+There are two ways of solving this problem.
+
+The first, and probably the most elegant one, is to make use of the
+`gen_server:enter_loop/3` function. It allows you to start your process
+normally (although it must be started with `proc_lib` like all special
+processes), then perform any needed operations before falling back into
+the normal `gen_server` execution loop.
+
+.Use a gen_server for protocol handling
+
+[source,erlang]
+----
+-module(my_protocol).
+-behaviour(gen_server).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/4]).
+%% Exports of other gen_server callbacks here.
+
+start_link(Ref, Socket, Transport, Opts) ->
+ proc_lib:start_link(?MODULE, init, [Ref, Socket, Transport, Opts]).
+
+init(Ref, Socket, Transport, _Opts = []) ->
+ ok = proc_lib:init_ack({ok, self()}),
+ %% Perform any required state initialization here.
+ ok = ranch:accept_ack(Ref),
+ ok = Transport:setopts(Socket, [{active, once}]),
+ gen_server:enter_loop(?MODULE, [], {state, Socket, Transport}).
+
+%% Other gen_server callbacks here.
+----
+
+The second method involves triggering a timeout just after `gen_server:init`
+ends. If you return a timeout value of `0` then the `gen_server` will call
+`handle_info(timeout, _, _)` right away.
+
+.Use a gen_server for protocol handling, method 2
+
+[source,erlang]
+----
+-module(my_protocol).
+-behaviour(gen_server).
+-behaviour(ranch_protocol).
+
+%% Exports go here.
+
+init([Ref, Socket, Transport]) ->
+ {ok, {state, Ref, Socket, Transport}, 0}.
+
+handle_info(timeout, State={state, Ref, Socket, Transport}) ->
+ ok = ranch:accept_ack(Ref),
+ ok = Transport:setopts(Socket, [{active, once}]),
+ {noreply, State};
+%% ...
+----
diff --git a/docs/en/ranch/1.2/guide/protocols/index.html b/docs/en/ranch/1.2/guide/protocols/index.html
new file mode 100644
index 00000000..cd44a06b
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/protocols/index.html
@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Protocols</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Protocols</span></h1>
+
+<div class="paragraph"><p>A protocol handler starts a connection process and defines the
+protocol logic executed in this process.</p></div>
+<div class="sect1">
+<h2 id="_writing_a_protocol_handler">Writing a protocol handler</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>All protocol handlers must implement the <code>ranch_protocol</code> behavior
+which defines a single callback, <code>start_link/4</code>. This callback is
+responsible for spawning a new process for handling the connection.
+It receives four arguments: the name of the listener, the socket, the
+transport handler being used and the protocol options defined in
+the call to <code>ranch:start_listener/6</code>. This callback must
+return <code>{ok, Pid}</code>, with <code>Pid</code> the pid of the new process.</p></div>
+<div class="paragraph"><p>The newly started process can then freely initialize itself. However,
+it must call <code>ranch:accept_ack/1</code> before doing any socket operation.
+This will ensure the connection process is the owner of the socket.
+It expects the listener&#8217;s name as argument.</p></div>
+<div class="listingblock">
+<div class="title">Acknowledge accepting the socket</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>If your protocol code requires specific socket options, you should
+set them while initializing your connection process, after
+calling <code>ranch:accept_ack/1</code>. You can use <code>Transport:setopts/2</code>
+for that purpose.</p></div>
+<div class="paragraph"><p>Following is the complete protocol code for the example found
+in <code>examples/tcp_echo/</code>.</p></div>
+<div class="listingblock">
+<div class="title">Protocol module that echoes everything it receives</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">-module</span></span>(<span style="color: #FF6600">echo_protocol</span>)<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Pid</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000080">spawn_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>]),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Pid</span>}<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
+ <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>)<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>),
+ <span style="font-weight: bold"><span style="color: #000000">loop</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>);
+ <span style="color: #990000">_</span> <span style="color: #990000">-&gt;</span>
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">close</span></span>(<span style="color: #009900">Socket</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_using_gen_server">Using gen_server</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Special processes like the ones that use the <code>gen_server</code> or <code>gen_fsm</code>
+behaviours have the particularity of having their <code>start_link</code> call not
+return until the <code>init</code> function returns. This is problematic, because
+you won&#8217;t be able to call <code>ranch:accept_ack/1</code> from the <code>init</code> callback
+as this would cause a deadlock to happen.</p></div>
+<div class="paragraph"><p>There are two ways of solving this problem.</p></div>
+<div class="paragraph"><p>The first, and probably the most elegant one, is to make use of the
+<code>gen_server:enter_loop/3</code> function. It allows you to start your process
+normally (although it must be started with <code>proc_lib</code> like all special
+processes), then perform any needed operations before falling back into
+the normal <code>gen_server</code> execution loop.</p></div>
+<div class="listingblock">
+<div class="title">Use a gen_server for protocol handling</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">start_link</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-export</span></span>([<span style="font-weight: bold"><span style="color: #000000">init</span></span><span style="color: #990000">/</span><span style="color: #993399">4</span>])<span style="color: #990000">.</span>
+<span style="font-style: italic"><span style="color: #9A1900">%% Exports of other gen_server callbacks here.</span></span>
+
+<span style="font-weight: bold"><span style="color: #000000">start_link</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">proc_lib:start_link</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, <span style="color: #FF6600">init</span>, [<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">Opts</span>])<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>, <span style="color: #009900">_Opts</span> <span style="color: #990000">=</span> []) <span style="color: #990000">-&gt;</span>
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">proc_lib:init_ack</span></span>({<span style="color: #FF6600">ok</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>()}),
+ <span style="font-style: italic"><span style="color: #9A1900">%% Perform any required state initialization here.</span></span>
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
+ <span style="font-weight: bold"><span style="color: #000000">gen_server:enter_loop</span></span>(<span style="font-weight: bold"><span style="color: #000080">?MODULE</span></span>, [], {<span style="color: #FF6600">state</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>})<span style="color: #990000">.</span>
+
+<span style="font-style: italic"><span style="color: #9A1900">%% Other gen_server callbacks here.</span></span></tt></pre></div></div>
+<div class="paragraph"><p>The second method involves triggering a timeout just after <code>gen_server:init</code>
+ends. If you return a timeout value of <code>0</code> then the <code>gen_server</code> will call
+<code>handle_info(timeout, _, _)</code> right away.</p></div>
+<div class="listingblock">
+<div class="title">Use a gen_server for protocol handling, method 2</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000080">-module</span></span>(<span style="color: #FF6600">my_protocol</span>)<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">gen_server</span>)<span style="color: #990000">.</span>
+<span style="font-weight: bold"><span style="color: #000080">-behaviour</span></span>(<span style="color: #FF6600">ranch_protocol</span>)<span style="color: #990000">.</span>
+
+<span style="font-style: italic"><span style="color: #9A1900">%% Exports go here.</span></span>
+
+<span style="font-weight: bold"><span style="color: #000000">init</span></span>([<span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>]) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, {<span style="color: #FF6600">state</span>, <span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>}, <span style="color: #993399">0</span>}<span style="color: #990000">.</span>
+
+<span style="font-weight: bold"><span style="color: #000000">handle_info</span></span>(<span style="color: #FF6600">timeout</span>, <span style="color: #009900">State</span><span style="color: #990000">=</span>{<span style="color: #FF6600">state</span>, <span style="color: #009900">Ref</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Transport</span>}) <span style="color: #990000">-&gt;</span>
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:accept_ack</span></span>(<span style="color: #009900">Ref</span>),
+ <span style="color: #0000FF">ok</span> <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
+ {<span style="color: #FF6600">noreply</span>, <span style="color: #009900">State</span>};
+<span style="font-style: italic"><span style="color: #9A1900">%% ...</span></span></tt></pre></div></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/ssl_auth.asciidoc b/docs/en/ranch/1.2/guide/ssl_auth.asciidoc
new file mode 100644
index 00000000..de0bbaf0
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/ssl_auth.asciidoc
@@ -0,0 +1,120 @@
+== SSL client authentication
+
+=== Purpose
+
+SSL client authentication is a mechanism allowing applications to
+identify certificates. This allows your application to make sure that
+the client is an authorized certificate, but makes no claim about
+whether the user can be trusted. This can be combined with a password
+based authentication to attain greater security.
+
+The server only needs to retain the certificate serial number and
+the certificate issuer to authenticate the certificate. Together,
+they can be used to uniquely identify a certicate.
+
+As Ranch allows the same protocol code to be used for both SSL and
+non-SSL transports, you need to make sure you are in an SSL context
+before attempting to perform an SSL client authentication. This
+can be done by checking the return value of `Transport:name/0`.
+
+=== Obtaining client certificates
+
+You can obtain client certificates from various sources. You can
+generate them yourself, or you can use a service like CAcert.org
+which allows you to generate client and server certificates for
+free.
+
+Following are the steps you need to take to create a CAcert.org
+account, generate a certificate and install it in your favorite
+browser.
+
+* Open http://cacert.org in your favorite browser
+* Root Certificate link: install both certificates
+* Join (Register an account)
+* Verify your account (check your email inbox!)
+* Log in
+* Client Certificates: New
+* Follow instructions to create the certificate
+* Install the certificate in your browser
+
+You can optionally save the certificate for later use, for example
+to extract the `IssuerID` information as will be detailed later on.
+
+=== Transport configuration
+
+The SSL transport does not request a client certificate by default.
+You need to specify the `{verify, verify_peer}` option when starting
+the listener to enable this behavior.
+
+.Configure a listener for SSL authentication
+
+[source,erlang]
+{ok, _} = ranch:start_listener(my_ssl, 100,
+ ranch_ssl, [
+ {port, SSLPort},
+ {certfile, PathToCertfile},
+ {cacertfile, PathToCACertfile},
+ {verify, verify_peer}
+ ],
+ my_protocol, []
+).
+
+In this example we set the required `port` and `certfile`, but also
+the `cacertfile` containing the CACert.org root certificate, and
+the option to request the client certificate.
+
+If you enable the `{verify, verify_peer}` option and the client does
+not have a client certificate configured for your domain, then no
+certificate will be sent. This allows you to use SSL for more than
+just authenticated clients.
+
+=== Authentication
+
+To authenticate users, you must first save the certificate information
+required. If you have your users' certificate files, you can simply
+load the certificate and retrieve the information directly.
+
+.Retrieve the issuer ID from a certificate
+
+[source,erlang]
+----
+certfile_to_issuer_id(Filename) ->
+ {ok, Data} = file:read_file(Filename),
+ [{'Certificate', Cert, not_encrypted}] = public_key:pem_decode(Data),
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID.
+----
+
+The `IssuerID` variable contains both the certificate serial number
+and the certificate issuer stored in a tuple, so this value alone can
+be used to uniquely identify the user certificate. You can save this
+value in a database, a configuration file or any other place where an
+Erlang term can be stored and retrieved.
+
+To retrieve the `IssuerID` from a running connection, you need to first
+retrieve the client certificate and then extract this information from
+it. Ranch does not provide a function to retrieve the client certificate.
+Instead you can use the `ssl:peercert/1` function. Once you have the
+certificate, you can again use the `public_key:pkix_issuer_id/2` to
+extract the `IssuerID` value.
+
+The following function returns the `IssuerID` or `false` if no client
+certificate was found. This snippet is intended to be used from your
+protocol code.
+
+.Retrieve the issuer ID from the certificate for the current connection
+
+[source,erlang]
+----
+socket_to_issuer_id(Socket) ->
+ case ssl:peercert(Socket) of
+ {error, no_peercert} ->
+ false;
+ {ok, Cert} ->
+ {ok, IssuerID} = public_key:pkix_issuer_id(Cert, self),
+ IssuerID
+ end.
+----
+
+You then only need to match the `IssuerID` value to authenticate the
+user.
diff --git a/docs/en/ranch/1.2/guide/ssl_auth/index.html b/docs/en/ranch/1.2/guide/ssl_auth/index.html
new file mode 100644
index 00000000..a1018d85
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/ssl_auth/index.html
@@ -0,0 +1,292 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: SSL client authentication</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>SSL client authentication</span></h1>
+
+<div class="sect1">
+<h2 id="_purpose">Purpose</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>SSL client authentication is a mechanism allowing applications to
+identify certificates. This allows your application to make sure that
+the client is an authorized certificate, but makes no claim about
+whether the user can be trusted. This can be combined with a password
+based authentication to attain greater security.</p></div>
+<div class="paragraph"><p>The server only needs to retain the certificate serial number and
+the certificate issuer to authenticate the certificate. Together,
+they can be used to uniquely identify a certicate.</p></div>
+<div class="paragraph"><p>As Ranch allows the same protocol code to be used for both SSL and
+non-SSL transports, you need to make sure you are in an SSL context
+before attempting to perform an SSL client authentication. This
+can be done by checking the return value of <code>Transport:name/0</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_obtaining_client_certificates">Obtaining client certificates</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can obtain client certificates from various sources. You can
+generate them yourself, or you can use a service like CAcert.org
+which allows you to generate client and server certificates for
+free.</p></div>
+<div class="paragraph"><p>Following are the steps you need to take to create a CAcert.org
+account, generate a certificate and install it in your favorite
+browser.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Open <a href="http://cacert.org">http://cacert.org</a> in your favorite browser
+</p>
+</li>
+<li>
+<p>
+Root Certificate link: install both certificates
+</p>
+</li>
+<li>
+<p>
+Join (Register an account)
+</p>
+</li>
+<li>
+<p>
+Verify your account (check your email inbox!)
+</p>
+</li>
+<li>
+<p>
+Log in
+</p>
+</li>
+<li>
+<p>
+Client Certificates: New
+</p>
+</li>
+<li>
+<p>
+Follow instructions to create the certificate
+</p>
+</li>
+<li>
+<p>
+Install the certificate in your browser
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>You can optionally save the certificate for later use, for example
+to extract the <code>IssuerID</code> information as will be detailed later on.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_transport_configuration">Transport configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The SSL transport does not request a client certificate by default.
+You need to specify the <code>{verify, verify_peer}</code> option when starting
+the listener to enable this behavior.</p></div>
+<div class="listingblock">
+<div class="title">Configure a listener for SSL authentication</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #990000">_</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">ranch:start_listener</span></span>(<span style="color: #FF6600">my_ssl</span>, <span style="color: #993399">100</span>,
+ <span style="color: #FF6600">ranch_ssl</span>, [
+ {<span style="color: #FF6600">port</span>, <span style="color: #009900">SSLPort</span>},
+ {<span style="color: #FF6600">certfile</span>, <span style="color: #009900">PathToCertfile</span>},
+ {<span style="color: #FF6600">cacertfile</span>, <span style="color: #009900">PathToCACertfile</span>},
+ {<span style="color: #FF6600">verify</span>, <span style="color: #FF6600">verify_peer</span>}
+ ],
+ <span style="color: #FF6600">my_protocol</span>, []
+)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>In this example we set the required <code>port</code> and <code>certfile</code>, but also
+the <code>cacertfile</code> containing the CACert.org root certificate, and
+the option to request the client certificate.</p></div>
+<div class="paragraph"><p>If you enable the <code>{verify, verify_peer}</code> option and the client does
+not have a client certificate configured for your domain, then no
+certificate will be sent. This allows you to use SSL for more than
+just authenticated clients.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_authentication">Authentication</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To authenticate users, you must first save the certificate information
+required. If you have your users' certificate files, you can simply
+load the certificate and retrieve the information directly.</p></div>
+<div class="listingblock">
+<div class="title">Retrieve the issuer ID from a certificate</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">certfile_to_issuer_id</span></span>(<span style="color: #009900">Filename</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:read_file</span></span>(<span style="color: #009900">Filename</span>),
+ [{<span style="color: #FF6600">'Certificate'</span>, <span style="color: #009900">Cert</span>, <span style="color: #FF6600">not_encrypted</span>}] <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pem_decode</span></span>(<span style="color: #009900">Data</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
+ <span style="color: #009900">IssuerID</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>The <code>IssuerID</code> variable contains both the certificate serial number
+and the certificate issuer stored in a tuple, so this value alone can
+be used to uniquely identify the user certificate. You can save this
+value in a database, a configuration file or any other place where an
+Erlang term can be stored and retrieved.</p></div>
+<div class="paragraph"><p>To retrieve the <code>IssuerID</code> from a running connection, you need to first
+retrieve the client certificate and then extract this information from
+it. Ranch does not provide a function to retrieve the client certificate.
+Instead you can use the <code>ssl:peercert/1</code> function. Once you have the
+certificate, you can again use the <code>public_key:pkix_issuer_id/2</code> to
+extract the <code>IssuerID</code> value.</p></div>
+<div class="paragraph"><p>The following function returns the <code>IssuerID</code> or <code>false</code> if no client
+certificate was found. This snippet is intended to be used from your
+protocol code.</p></div>
+<div class="listingblock">
+<div class="title">Retrieve the issuer ID from the certificate for the current connection</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">socket_to_issuer_id</span></span>(<span style="color: #009900">Socket</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">ssl:peercert</span></span>(<span style="color: #009900">Socket</span>) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ {<span style="color: #FF6600">error</span>, <span style="color: #FF6600">no_peercert</span>} <span style="color: #990000">-&gt;</span>
+ <span style="color: #000080">false</span>;
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Cert</span>} <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">IssuerID</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">public_key:pkix_issuer_id</span></span>(<span style="color: #009900">Cert</span>, <span style="font-weight: bold"><span style="color: #000080">self</span></span>),
+ <span style="color: #009900">IssuerID</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You then only need to match the <code>IssuerID</code> value to authenticate the
+user.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/guide/transports.asciidoc b/docs/en/ranch/1.2/guide/transports.asciidoc
new file mode 100644
index 00000000..91953762
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/transports.asciidoc
@@ -0,0 +1,169 @@
+== Transports
+
+A transport defines the interface to interact with a socket.
+
+Transports can be used for connecting, listening and accepting
+connections, but also for receiving and sending data. Both
+passive and active mode are supported, although all sockets
+are initialized as passive.
+
+=== TCP transport
+
+The TCP transport is a thin wrapper around `gen_tcp`.
+
+=== SSL transport
+
+The SSL transport is a thin wrapper around `ssl`. It requires
+the `crypto`, `asn1`, `public_key` and `ssl` applications
+to be started. When starting an SSL listener, Ranch will attempt
+to automatically start them. It will not try to stop them when
+the listener is removed, however.
+
+.Starting the SSL application
+
+[source,erlang]
+ssl:start().
+
+In a proper OTP setting, you will need to make your application
+depend on the `crypto`, `public_key` and `ssl` applications.
+They will be started automatically when starting your release.
+
+The SSL transport `accept/2` function performs both transport
+and SSL accepts. Errors occurring during the SSL accept phase
+are returned as `{error, {ssl_accept, atom()}}` to differentiate
+on which socket the problem occurred.
+
+=== Sending and receiving data
+
+This section assumes that `Transport` is a valid transport handler
+(like `ranch_tcp` or `ranch_ssl`) and `Socket` is a connected
+socket obtained through the listener.
+
+You can send data to a socket by calling the `Transport:send/2`
+function. The data can be given as `iodata()`, which is defined as
+`binary() | iolist()`. All the following calls will work:
+
+.Sending data to the socket
+
+[source,erlang]
+----
+Transport:send(Socket, <<"Ranch is cool!">>).
+Transport:send(Socket, "Ranch is cool!").
+Transport:send(Socket, ["Ranch", ["is", "cool!"]]).
+Transport:send(Socket, ["Ranch", [<<"is">>, "cool!"]]).
+----
+
+You can receive data either in passive or in active mode. Passive mode
+means that you will perform a blocking `Transport:recv/3` call, while
+active mode means that you will receive the data as a message.
+
+By default, all data will be received as binary. It is possible to
+receive data as strings, although this is not recommended as binaries
+are a more efficient construct, especially for binary protocols.
+
+Receiving data using passive mode requires a single function call. The
+first argument is the socket, and the third argument is a timeout duration
+before the call returns with `{error, timeout}`.
+
+The second argument is the amount of data in bytes that we want to receive.
+The function will wait for data until it has received exactly this amount.
+If you are not expecting a precise size, you can specify 0 which will make
+this call return as soon as data was read, regardless of its size.
+
+.Receiving data from the socket in passive mode
+
+[source,erlang]
+{ok, Data} = Transport:recv(Socket, 0, 5000).
+
+Active mode requires you to inform the socket that you want to receive
+data as a message and to write the code to actually receive it.
+
+There are two kinds of active modes: `{active, once}` and
+`{active, true}`. The first will send a single message before going
+back to passive mode; the second will send messages indefinitely.
+We recommend not using the `{active, true}` mode as it could quickly
+flood your process mailbox. It's better to keep the data in the socket
+and read it only when required.
+
+Three different messages can be received:
+
+* `{OK, Socket, Data}`
+* `{Closed, Socket}`
+* `{Error, Socket, Reason}`
+
+The value of `OK`, `Closed` and `Error` can be different
+depending on the transport being used. To be able to properly match
+on them you must first call the `Transport:messages/0` function.
+
+.Retrieving the transport's active message identifiers
+
+[source,erlang]
+{OK, Closed, Error} = Transport:messages().
+
+To start receiving messages you will need to call the `Transport:setopts/2`
+function, and do so every time you want to receive data.
+
+.Receiving messages from the socket in active mode
+
+[source,erlang]
+----
+{OK, Closed, Error} = Transport:messages(),
+Transport:setopts(Socket, [{active, once}]),
+receive
+ {OK, Socket, Data} ->
+ io:format("data received: ~p~n", [Data]);
+ {Closed, Socket} ->
+ io:format("socket got closed!~n");
+ {Error, Socket, Reason} ->
+ io:format("error happened: ~p~n", [Reason])
+end.
+----
+
+You can easily integrate active sockets with existing Erlang code as all
+you really need is just a few more clauses when receiving messages.
+
+=== Sending files
+
+As in the previous section it is assumed `Transport` is a valid transport
+handler and `Socket` is a connected socket obtained through the listener.
+
+To send a whole file, with name `Filename`, over a socket:
+
+.Sending a file by filename
+
+[source,erlang]
+{ok, SentBytes} = Transport:sendfile(Socket, Filename).
+
+Or part of a file, with `Offset` greater than or equal to 0, `Bytes` number of
+bytes and chunks of size `ChunkSize`:
+
+.Sending part of a file by filename in chunks
+
+[source,erlang]
+Opts = [{chunk_size, ChunkSize}],
+{ok, SentBytes} = Transport:sendfile(Socket, Filename, Offset, Bytes, Opts).
+
+To improve efficiency when sending multiple parts of the same file it is also
+possible to use a file descriptor opened in raw mode:
+
+.Sending a file opened in raw mode
+
+[source,erlang]
+{ok, RawFile} = file:open(Filename, [raw, read, binary]),
+{ok, SentBytes} = Transport:sendfile(Socket, RawFile, Offset, Bytes, Opts).
+
+=== Writing a transport handler
+
+A transport handler is a module implementing the `ranch_transport` behavior.
+It defines a certain number of callbacks that must be written in order to
+allow transparent usage of the transport handler.
+
+The behavior doesn't define the socket options available when opening a
+socket. These do not need to be common to all transports as it's easy enough
+to write different initialization functions for the different transports that
+will be used. With one exception though. The `setopts/2` function *must*
+implement the `{active, once}` and the `{active, true}` options.
+
+If the transport handler doesn't have a native implementation of `sendfile/5` a
+fallback is available, `ranch_transport:sendfile/6`. The extra first argument
+is the transport's module. See `ranch_ssl` for an example.
diff --git a/docs/en/ranch/1.2/guide/transports/index.html b/docs/en/ranch/1.2/guide/transports/index.html
new file mode 100644
index 00000000..a3ce9983
--- /dev/null
+++ b/docs/en/ranch/1.2/guide/transports/index.html
@@ -0,0 +1,323 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Transports</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Transports</span></h1>
+
+<div class="paragraph"><p>A transport defines the interface to interact with a socket.</p></div>
+<div class="paragraph"><p>Transports can be used for connecting, listening and accepting
+connections, but also for receiving and sending data. Both
+passive and active mode are supported, although all sockets
+are initialized as passive.</p></div>
+<div class="sect1">
+<h2 id="_tcp_transport">TCP transport</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The TCP transport is a thin wrapper around <code>gen_tcp</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_ssl_transport">SSL transport</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The SSL transport is a thin wrapper around <code>ssl</code>. It requires
+the <code>crypto</code>, <code>asn1</code>, <code>public_key</code> and <code>ssl</code> applications
+to be started. When starting an SSL listener, Ranch will attempt
+to automatically start them. It will not try to stop them when
+the listener is removed, however.</p></div>
+<div class="listingblock">
+<div class="title">Starting the SSL application</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ssl:start</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>In a proper OTP setting, you will need to make your application
+depend on the <code>crypto</code>, <code>public_key</code> and <code>ssl</code> applications.
+They will be started automatically when starting your release.</p></div>
+<div class="paragraph"><p>The SSL transport <code>accept/2</code> function performs both transport
+and SSL accepts. Errors occurring during the SSL accept phase
+are returned as <code>{error, {ssl_accept, atom()}}</code> to differentiate
+on which socket the problem occurred.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_and_receiving_data">Sending and receiving data</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>This section assumes that <code>Transport</code> is a valid transport handler
+(like <code>ranch_tcp</code> or <code>ranch_ssl</code>) and <code>Socket</code> is a connected
+socket obtained through the listener.</p></div>
+<div class="paragraph"><p>You can send data to a socket by calling the <code>Transport:send/2</code>
+function. The data can be given as <code>iodata()</code>, which is defined as
+<code>binary() | iolist()</code>. All the following calls will work:</p></div>
+<div class="listingblock">
+<div class="title">Sending data to the socket</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"Ranch is cool!"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span>
+<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #FF0000">"Ranch is cool!"</span>)<span style="color: #990000">.</span>
+<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #FF0000">"is"</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span>
+<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">send</span></span>(<span style="color: #009900">Socket</span>, [<span style="color: #FF0000">"Ranch"</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"is"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">"cool!"</span>]])<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can receive data either in passive or in active mode. Passive mode
+means that you will perform a blocking <code>Transport:recv/3</code> call, while
+active mode means that you will receive the data as a message.</p></div>
+<div class="paragraph"><p>By default, all data will be received as binary. It is possible to
+receive data as strings, although this is not recommended as binaries
+are a more efficient construct, especially for binary protocols.</p></div>
+<div class="paragraph"><p>Receiving data using passive mode requires a single function call. The
+first argument is the socket, and the third argument is a timeout duration
+before the call returns with <code>{error, timeout}</code>.</p></div>
+<div class="paragraph"><p>The second argument is the amount of data in bytes that we want to receive.
+The function will wait for data until it has received exactly this amount.
+If you are not expecting a precise size, you can specify 0 which will make
+this call return as soon as data was read, regardless of its size.</p></div>
+<div class="listingblock">
+<div class="title">Receiving data from the socket in passive mode</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">recv</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #993399">0</span>, <span style="color: #993399">5000</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Active mode requires you to inform the socket that you want to receive
+data as a message and to write the code to actually receive it.</p></div>
+<div class="paragraph"><p>There are two kinds of active modes: <code>{active, once}</code> and
+<code>{active, true}</code>. The first will send a single message before going
+back to passive mode; the second will send messages indefinitely.
+We recommend not using the <code>{active, true}</code> mode as it could quickly
+flood your process mailbox. It&#8217;s better to keep the data in the socket
+and read it only when required.</p></div>
+<div class="paragraph"><p>Three different messages can be received:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<code>{OK, Socket, Data}</code>
+</p>
+</li>
+<li>
+<p>
+<code>{Closed, Socket}</code>
+</p>
+</li>
+<li>
+<p>
+<code>{Error, Socket, Reason}</code>
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>The value of <code>OK</code>, <code>Closed</code> and <code>Error</code> can be different
+depending on the transport being used. To be able to properly match
+on them you must first call the <code>Transport:messages/0</code> function.</p></div>
+<div class="listingblock">
+<div class="title">Retrieving the transport&#8217;s active message identifiers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #009900">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>()<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>To start receiving messages you will need to call the <code>Transport:setopts/2</code>
+function, and do so every time you want to receive data.</p></div>
+<div class="listingblock">
+<div class="title">Receiving messages from the socket in active mode</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #009900">OK</span>, <span style="color: #009900">Closed</span>, <span style="color: #009900">Error</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">messages</span></span>(),
+<span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">setopts</span></span>(<span style="color: #009900">Socket</span>, [{<span style="color: #FF6600">active</span>, <span style="color: #FF6600">once</span>}]),
+<span style="font-weight: bold"><span style="color: #0000FF">receive</span></span>
+ {<span style="color: #009900">OK</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Data</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"data received: ~p~n"</span>, [<span style="color: #009900">Data</span>]);
+ {<span style="color: #009900">Closed</span>, <span style="color: #009900">Socket</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"socket got closed!~n"</span>);
+ {<span style="color: #009900">Error</span>, <span style="color: #009900">Socket</span>, <span style="color: #009900">Reason</span>} <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"error happened: ~p~n"</span>, [<span style="color: #009900">Reason</span>])
+<span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>You can easily integrate active sockets with existing Erlang code as all
+you really need is just a few more clauses when receiving messages.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_sending_files">Sending files</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>As in the previous section it is assumed <code>Transport</code> is a valid transport
+handler and <code>Socket</code> is a connected socket obtained through the listener.</p></div>
+<div class="paragraph"><p>To send a whole file, with name <code>Filename</code>, over a socket:</p></div>
+<div class="listingblock">
+<div class="title">Sending a file by filename</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Or part of a file, with <code>Offset</code> greater than or equal to 0, <code>Bytes</code> number of
+bytes and chunks of size <code>ChunkSize</code>:</p></div>
+<div class="listingblock">
+<div class="title">Sending part of a file by filename in chunks</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Opts</span> <span style="color: #990000">=</span> [{<span style="color: #FF6600">chunk_size</span>, <span style="color: #009900">ChunkSize</span>}],
+{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">Filename</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>To improve efficiency when sending multiple parts of the same file it is also
+possible to use a file descriptor opened in raw mode:</p></div>
+<div class="listingblock">
+<div class="title">Sending a file opened in raw mode</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #FF6600">ok</span>, <span style="color: #009900">RawFile</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">file:open</span></span>(<span style="color: #009900">Filename</span>, [<span style="color: #FF6600">raw</span>, <span style="color: #FF6600">read</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>]),
+{<span style="color: #FF6600">ok</span>, <span style="color: #009900">SentBytes</span>} <span style="color: #990000">=</span> <span style="color: #009900">Transport</span><span style="color: #990000">:</span><span style="font-weight: bold"><span style="color: #000000">sendfile</span></span>(<span style="color: #009900">Socket</span>, <span style="color: #009900">RawFile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Bytes</span>, <span style="color: #009900">Opts</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_writing_a_transport_handler">Writing a transport handler</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>A transport handler is a module implementing the <code>ranch_transport</code> behavior.
+It defines a certain number of callbacks that must be written in order to
+allow transparent usage of the transport handler.</p></div>
+<div class="paragraph"><p>The behavior doesn&#8217;t define the socket options available when opening a
+socket. These do not need to be common to all transports as it&#8217;s easy enough
+to write different initialization functions for the different transports that
+will be used. With one exception though. The <code>setopts/2</code> function <strong>must</strong>
+implement the <code>{active, once}</code> and the <code>{active, true}</code> options.</p></div>
+<div class="paragraph"><p>If the transport handler doesn&#8217;t have a native implementation of <code>sendfile/5</code> a
+fallback is available, <code>ranch_transport:sendfile/6</code>. The extra first argument
+is the transport&#8217;s module. See <code>ranch_ssl</code> for an example.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+
+ User Guide
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/index.html b/docs/en/ranch/1.2/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/ranch/1.2/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/en/ranch/1.2/manual/index.html b/docs/en/ranch/1.2/manual/index.html
new file mode 100644
index 00000000..339f6643
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/index.html
@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Ranch Function Reference</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Ranch Function Reference</span></h1>
+
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="ranch_app">ranch(7)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ranch">ranch(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ranch_protocol">ranch_protocol(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ranch_ssl">ranch_ssl(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ranch_tcp">ranch_tcp(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="ranch_transport">ranch_transport(3)</a>
+</p>
+</li>
+</ul></div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch/index.html b/docs/en/ranch/1.2/manual/ranch/index.html
new file mode 100644
index 00000000..bdec4cca
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch/index.html
@@ -0,0 +1,557 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch - socket acceptor pool</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch</code> module provides functions for starting and
+manipulating Ranch listeners.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_max_conns_non_neg_integer_infinity">max_conns() = non_neg_integer() | infinity</h3>
+<div class="paragraph"><p>Maximum number of connections allowed on this listener.</p></div>
+<div class="paragraph"><p>This is a soft limit. The actual number of connections
+might be slightly above the limit due to concurrency
+when accepting new connections. Some connections may
+also be removed from this count explicitly by the user
+code.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_opt">opt()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">ack_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
+ | {<span style="color: #FF6600">connection_type</span>, <span style="color: #FF6600">worker</span> | <span style="color: #FF6600">supervisor</span>}
+ | {<span style="color: #FF6600">max_connections</span>, <span style="font-weight: bold"><span style="color: #000000">max_conns</span></span>()}
+ | {<span style="color: #000080">shutdown</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>() | <span style="color: #FF6600">brutal_kill</span>}
+ | {<span style="color: #FF6600">socket</span>, <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Ranch-specific transport options.</p></div>
+<div class="paragraph"><p>These options are not passed on to the transports.
+They are used by Ranch while setting up the listeners.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_ref_any">ref() = any()</h3>
+<div class="paragraph"><p>Unique name used to refer to a listener.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_option_descriptions">Option descriptions</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>None of the options are required.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+ack_timeout (5000)
+</dt>
+<dd>
+<p>
+ Maximum allowed time for the <code>ranch:accept_ack/1</code> call to finish.
+</p>
+</dd>
+<dt class="hdlist1">
+connection_type (worker)
+</dt>
+<dd>
+<p>
+ Type of process that will handle the connection.
+</p>
+</dd>
+<dt class="hdlist1">
+max_connections (1024)
+</dt>
+<dd>
+<p>
+ Maximum number of active connections. Soft limit. Using <code>infinity</code> will disable the limit entirely.
+</p>
+</dd>
+<dt class="hdlist1">
+shutdown (5000)
+</dt>
+<dd>
+<p>
+ Maximum allowed time for children to stop on listener shutdown.
+</p>
+</dd>
+<dt class="hdlist1">
+socket
+</dt>
+<dd>
+<p>
+ Listening socket opened externally to be used instead of calling <code>Transport:listen/1</code>.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_accept_ack_ref_8594_ok">accept_ack(Ref) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Acknowledge that the connection is accepted.</p></div>
+<div class="paragraph"><p>This function MUST be used by a connection process to inform
+Ranch that it initialized properly and let it perform any
+additional operations before the socket can be safely used.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_child_spec_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_supervisor_child_spec">child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; supervisor:child_spec()</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+NbAcceptors = non_neg_integer()
+</dt>
+<dd>
+<p>
+Number of acceptor processes.
+</p>
+</dd>
+<dt class="hdlist1">
+Transport = module()
+</dt>
+<dd>
+<p>
+Transport module.
+</p>
+</dd>
+<dt class="hdlist1">
+TransOpts = any()
+</dt>
+<dd>
+<p>
+Transport options.
+</p>
+</dd>
+<dt class="hdlist1">
+Protocol = module()
+</dt>
+<dd>
+<p>
+Protocol module.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = any()
+</dt>
+<dd>
+<p>
+Protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return child specifications for a new listener.</p></div>
+<div class="paragraph"><p>This function can be used to embed a listener directly
+in an application instead of letting Ranch handle it.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_addr_ref_8594_ip_port">get_addr(Ref) &#8594; {IP, Port}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+IP = inet:ip_address()
+</dt>
+<dd>
+<p>
+IP of the interface used by this listener.
+</p>
+</dd>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Port number used by this listener.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the IP address and port for the given listener.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_max_connections_ref_8594_maxconns">get_max_connections(Ref) &#8594; MaxConns</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+MaxConns = max_conns()
+</dt>
+<dd>
+<p>
+Current maximum number of connections.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the max number of connections allowed for the given listener.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_port_ref_8594_port">get_port(Ref) &#8594; Port</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Port number used by this listener.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the port for the given listener.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_get_protocol_options_ref_8594_protoopts">get_protocol_options(Ref) &#8594; ProtoOpts</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = any()
+</dt>
+<dd>
+<p>
+Current protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the protocol options set for the given listener.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_remove_connection_ref_8594_ok">remove_connection(Ref) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Do not count this connection when limiting the number of connections.</p></div>
+<div class="paragraph"><p>You can use this function for long-running connection processes
+which spend most of their time idling rather than consuming
+resources. This allows Ranch to accept a lot more connections
+without sacrificing the latency of the system.</p></div>
+<div class="paragraph"><p>This function may only be called from a connection process.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_max_connections_ref_maxconns_8594_ok">set_max_connections(Ref, MaxConns) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+MaxConns = max_conns()
+</dt>
+<dd>
+<p>
+New maximum number of connections.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set the max number of connections for the given listener.</p></div>
+<div class="paragraph"><p>The change will be applied immediately. If the new value is
+smaller than the previous one, Ranch will not kill the extra
+connections, but will wait for them to terminate properly.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_set_protocol_options_ref_protoopts_8594_ok">set_protocol_options(Ref, ProtoOpts) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = any()
+</dt>
+<dd>
+<p>
+New protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Set the protocol options for the given listener.</p></div>
+<div class="paragraph"><p>The change will be applied immediately for all new connections.
+Old connections will not receive the new options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_start_listener_ref_nbacceptors_transport_transopts_protocol_protoopts_8594_ok_pid_error_badarg">start_listener(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) &#8594; {ok, pid()} | {error, badarg}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+NbAcceptors = non_neg_integer()
+</dt>
+<dd>
+<p>
+Number of acceptor processes.
+</p>
+</dd>
+<dt class="hdlist1">
+Transport = module()
+</dt>
+<dd>
+<p>
+Transport module.
+</p>
+</dd>
+<dt class="hdlist1">
+TransOpts = any()
+</dt>
+<dd>
+<p>
+Transport options.
+</p>
+</dd>
+<dt class="hdlist1">
+Protocol = module()
+</dt>
+<dd>
+<p>
+Protocol module.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = any()
+</dt>
+<dd>
+<p>
+Protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Start listening for connections using the given transport
+and protocol. Returns the pid for this listener&#8217;s supervisor.</p></div>
+<div class="paragraph"><p>There are additional transport options that apply
+regardless of transport. They allow configuring how the
+connections are supervised, rate limited and more. Please
+consult the previous section for more details.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_stop_listener_ref_8594_ok_error_not_found">stop_listener(Ref) &#8594; ok | {error, not_found}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Stop the given listener.</p></div>
+<div class="paragraph"><p>The listener is stopped gracefully, first by closing the
+listening port, then by stopping the connection processes.
+These processes are stopped according to the <code>shutdown</code>
+transport option, which may be set to brutally kill all
+connection processes or give them some time to stop properly.</p></div>
+<div class="paragraph"><p>This function does not return until the listener is
+completely stopped.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_app/index.html b/docs/en/ranch/1.2/manual/ranch_app/index.html
new file mode 100644
index 00000000..ac3ffd08
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch_app/index.html
@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch(7)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch(7)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch - Socket acceptor pool for TCP protocols.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_dependencies">Dependencies</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch</code> application has no particular dependency required
+to start.</p></div>
+<div class="paragraph"><p>It has optional dependencies that are only required when
+listening for SSL connections. The dependencies are <code>crypto</code>,
+<code>asn1</code>, <code>public_key</code> and <code>ssl</code>. They are started automatically
+if they weren&#8217;t before.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_environment">Environment</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch</code> application defines one application environment
+configuration parameter.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+profile (false)
+</dt>
+<dd>
+<p>
+ When enabled, Ranch will start <code>eprof</code> profiling automatically.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>You can use the <code>ranch_app:profile_output/0</code> function to stop
+profiling and output the results to the files <em>procs.profile</em>
+and <em>total.profile</em>. Do not use in production.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_protocol/index.html b/docs/en/ranch/1.2/manual/ranch_protocol/index.html
new file mode 100644
index 00000000..aa0001c6
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch_protocol/index.html
@@ -0,0 +1,217 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch_protocol(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_protocol(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch_protocol - behaviour for protocol modules</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch_protocol</code> behaviour defines the interface used
+by Ranch protocols.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>None.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_start_link_ref_socket_transport_protoopts_8594_ok_pid_ok_pid_pid">start_link(Ref, Socket, Transport, ProtoOpts) &#8594; {ok, pid()} | {ok, pid(), pid()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Ref = ranch:ref()
+</dt>
+<dd>
+<p>
+Listener name.
+</p>
+</dd>
+<dt class="hdlist1">
+Socket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+Transport = module()
+</dt>
+<dd>
+<p>
+Transport module for this socket.
+</p>
+</dd>
+<dt class="hdlist1">
+ProtoOpts = any()
+</dt>
+<dd>
+<p>
+Protocol options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Start a new connection process for the given socket.</p></div>
+<div class="paragraph"><p>The only purpose of this callback is to start a process that
+will handle the socket. It must spawn the process, link and
+then return the new pid. This function will always be called
+from inside a supervisor.</p></div>
+<div class="paragraph"><p>This callback can also return two pids. The first pid is the
+pid of the process that will be supervised. The second pid is
+the pid of the process that will receive ownership of the
+socket. This second process must be a child of the first. This
+form is only available when <code>connection_type</code> is set to
+<code>supervisor</code>.</p></div>
+<div class="paragraph"><p>If any other value is returned, the supervisor will close the
+socket and assume no process has been started.</p></div>
+<div class="paragraph"><p>Do not perform any operations in this callback, as this would
+block the supervisor responsible for starting connection
+processes and degrade performance severely.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_ssl/index.html b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
new file mode 100644
index 00000000..2c0ef14f
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
@@ -0,0 +1,483 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch_ssl(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_ssl(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch_ssl - SSL transport module</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch_ssl</code> module implements an SSL Ranch transport.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_ssl_opt">ssl_opt()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">ssl_opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">alpn_preferred_protocols</span>, [<span style="font-weight: bold"><span style="color: #000080">binary</span></span>()]}
+ | {<span style="color: #FF6600">cacertfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">cacerts</span>, [<span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()]}
+ | {<span style="color: #FF6600">cert</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
+ | {<span style="color: #FF6600">certfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">ciphers</span>, [<span style="font-weight: bold"><span style="color: #000000">ssl:erl_cipher_suite</span></span>()] | <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">client_renegotiation</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">crl_cache</span>, {<span style="font-weight: bold"><span style="color: #000000">module</span></span>(), {<span style="color: #FF6600">internal</span> | <span style="font-weight: bold"><span style="color: #000000">any</span></span>(), <span style="font-weight: bold"><span style="color: #000080">list</span></span>()}}}
+ | {<span style="color: #FF6600">crl_check</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>() | <span style="color: #FF6600">peer</span> | <span style="color: #FF6600">best_effort</span>}
+ | {<span style="color: #FF6600">depth</span>, <span style="color: #993399">0</span><span style="color: #990000">..</span><span style="color: #993399">255</span>}
+ | {<span style="color: #FF6600">dh</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
+ | {<span style="color: #FF6600">dhfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">fail_if_no_peer_cert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">hibernate_after</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>() | <span style="color: #000080">undefined</span>}
+ | {<span style="color: #FF6600">honor_cipher_order</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">key</span>, {<span style="color: #FF6600">'RSAPrivateKey'</span> | <span style="color: #FF6600">'DSAPrivateKey'</span> | <span style="color: #FF6600">'PrivateKeyInfo'</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}}
+ | {<span style="color: #FF6600">keyfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">log_alert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">next_protocols_advertised</span>, [<span style="font-weight: bold"><span style="color: #000080">binary</span></span>()]}
+ | {<span style="color: #FF6600">partial_chain</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(([<span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()]) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">trusted_ca</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()} | <span style="color: #FF6600">unknown_ca</span>)}
+ | {<span style="color: #FF6600">password</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">psk_identity</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
+ | {<span style="color: #FF6600">reuse_session</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
+ | {<span style="color: #FF6600">reuse_sessions</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">secure_renegotiate</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">sni_fun</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
+ | {<span style="color: #FF6600">sni_hosts</span>, [{<span style="font-weight: bold"><span style="color: #000000">string</span></span>(), <span style="font-weight: bold"><span style="color: #000000">ssl_opt</span></span>()}]}
+ | {<span style="color: #FF6600">user_lookup_fun</span>, {<span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}}
+ | {<span style="color: #FF6600">verify</span>, <span style="font-weight: bold"><span style="color: #000000">ssl:verify_type</span></span>()}
+ | {<span style="color: #FF6600">verify_fun</span>, {<span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}}
+ | {<span style="color: #FF6600">versions</span>, [<span style="font-weight: bold"><span style="color: #000080">atom</span></span>()]}<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>SSL-specific listen options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_opt_ranch_tcp_opt_ssl_opt">opt() = ranch_tcp:opt() | ssl_opt()</h3>
+<div class="paragraph"><p>Listen options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_opts_opt">opts() = [opt()]</h3>
+<div class="paragraph"><p>List of listen options.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_option_descriptions">Option descriptions</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Specifying a certificate is mandatory, either through the <code>cert</code>
+or the <code>certfile</code> option. None of the other options are required.</p></div>
+<div class="paragraph"><p>The default value is given next to the option name.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+alpn_preferred_protocols
+</dt>
+<dd>
+<p>
+ Perform Application-Layer Protocol Negotiation with the given list of preferred protocols.
+</p>
+</dd>
+<dt class="hdlist1">
+cacertfile
+</dt>
+<dd>
+<p>
+ Path to PEM encoded trusted certificates file used to verify peer certificates.
+</p>
+</dd>
+<dt class="hdlist1">
+cacerts
+</dt>
+<dd>
+<p>
+ List of DER encoded trusted certificates.
+</p>
+</dd>
+<dt class="hdlist1">
+cert
+</dt>
+<dd>
+<p>
+ DER encoded user certificate.
+</p>
+</dd>
+<dt class="hdlist1">
+certfile
+</dt>
+<dd>
+<p>
+ Path to the PEM encoded user certificate file. May also contain the private key.
+</p>
+</dd>
+<dt class="hdlist1">
+ciphers
+</dt>
+<dd>
+<p>
+ List of ciphers that clients are allowed to use.
+</p>
+</dd>
+<dt class="hdlist1">
+client_renegotiation (true)
+</dt>
+<dd>
+<p>
+ Whether to allow client-initiated renegotiation.
+</p>
+</dd>
+<dt class="hdlist1">
+crl_cache ({ssl_crl_cache, {internal, []}})
+</dt>
+<dd>
+<p>
+ Customize the module used to cache Certificate Revocation Lists.
+</p>
+</dd>
+<dt class="hdlist1">
+crl_check (false)
+</dt>
+<dd>
+<p>
+ Whether to perform CRL check on all certificates in the chain during validation.
+</p>
+</dd>
+<dt class="hdlist1">
+depth (1)
+</dt>
+<dd>
+<p>
+ Maximum of intermediate certificates allowed in the certification path.
+</p>
+</dd>
+<dt class="hdlist1">
+dh
+</dt>
+<dd>
+<p>
+ DER encoded Diffie-Hellman parameters.
+</p>
+</dd>
+<dt class="hdlist1">
+dhfile
+</dt>
+<dd>
+<p>
+ Path to the PEM encoded Diffie-Hellman parameters file.
+</p>
+</dd>
+<dt class="hdlist1">
+fail_if_no_peer_cert (false)
+</dt>
+<dd>
+<p>
+ Whether to refuse the connection if the client sends an empty certificate.
+</p>
+</dd>
+<dt class="hdlist1">
+hibernate_after (undefined)
+</dt>
+<dd>
+<p>
+ Time in ms after which SSL socket processes go into hibernation to reduce memory usage.
+</p>
+</dd>
+<dt class="hdlist1">
+honor_cipher_order (false)
+</dt>
+<dd>
+<p>
+ If true, use the server&#8217;s preference for cipher selection. If false, use the client&#8217;s preference.
+</p>
+</dd>
+<dt class="hdlist1">
+key
+</dt>
+<dd>
+<p>
+ DER encoded user private key.
+</p>
+</dd>
+<dt class="hdlist1">
+keyfile
+</dt>
+<dd>
+<p>
+ Path to the PEM encoded private key file, if different than the certfile.
+</p>
+</dd>
+<dt class="hdlist1">
+log_alert (true)
+</dt>
+<dd>
+<p>
+ If false, error reports will not be displayed.
+</p>
+</dd>
+<dt class="hdlist1">
+next_protocols_advertised
+</dt>
+<dd>
+<p>
+ List of protocols to send to the client if it supports the Next Protocol extension.
+</p>
+</dd>
+<dt class="hdlist1">
+nodelay (true)
+</dt>
+<dd>
+<p>
+ Whether to enable TCP_NODELAY.
+</p>
+</dd>
+<dt class="hdlist1">
+partial_chain
+</dt>
+<dd>
+<p>
+ Claim an intermediate CA in the chain as trusted.
+</p>
+</dd>
+<dt class="hdlist1">
+password
+</dt>
+<dd>
+<p>
+ Password to the private key file, if password protected.
+</p>
+</dd>
+<dt class="hdlist1">
+psk_identity
+</dt>
+<dd>
+<p>
+ Provide the given PSK identity hint to the client during the handshake.
+</p>
+</dd>
+<dt class="hdlist1">
+reuse_session
+</dt>
+<dd>
+<p>
+ Custom policy to decide whether a session should be reused.
+</p>
+</dd>
+<dt class="hdlist1">
+reuse_sessions (false)
+</dt>
+<dd>
+<p>
+ Whether to allow session reuse.
+</p>
+</dd>
+<dt class="hdlist1">
+secure_renegotiate (false)
+</dt>
+<dd>
+<p>
+ Whether to reject renegotiation attempts that do not conform to RFC5746.
+</p>
+</dd>
+<dt class="hdlist1">
+sni_fun
+</dt>
+<dd>
+<p>
+ Function called when the client requests a host using Server Name Indication. Returns options to apply.
+</p>
+</dd>
+<dt class="hdlist1">
+sni_hosts
+</dt>
+<dd>
+<p>
+ Options to apply for the host that matches what the client requested with Server Name Indication.
+</p>
+</dd>
+<dt class="hdlist1">
+user_lookup_fun
+</dt>
+<dd>
+<p>
+ Function called to determine the shared secret when using PSK, or provide parameters when using SRP.
+</p>
+</dd>
+<dt class="hdlist1">
+verify (verify_none)
+</dt>
+<dd>
+<p>
+ Use <code>verify_peer</code> to request a certificate from the client.
+</p>
+</dd>
+<dt class="hdlist1">
+verify_fun
+</dt>
+<dd>
+<p>
+ Custom policy to decide whether a client certificate is valid.
+</p>
+</dd>
+<dt class="hdlist1">
+versions
+</dt>
+<dd>
+<p>
+ TLS protocol versions that will be supported.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Note that the client will not send a certificate unless the
+value for the <code>verify</code> option is set to <code>verify_peer</code>. This
+means that the <code>fail_if_no_peer_cert</code> only apply when combined
+with the <code>verify</code> option. The <code>verify_fun</code> option allows
+greater control over the client certificate validation.</p></div>
+<div class="paragraph"><p>The options <code>sni_fun</code> and <code>sni_hosts</code> are mutually exclusive.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>None.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_tcp/index.html b/docs/en/ranch/1.2/manual/ranch_tcp/index.html
new file mode 100644
index 00000000..845e3022
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch_tcp/index.html
@@ -0,0 +1,408 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch_tcp(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_tcp(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch_tcp - TCP transport module</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch_tcp</code> module implements a TCP Ranch transport.</p></div>
+<div class="paragraph"><p>Note that due to bugs in OTP up to at least R16B02, it is
+recommended to disable async threads when using the
+<code>sendfile</code> function of this transport, as it can make
+the threads stuck indefinitely.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_opt">opt()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">backlog</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">buffer</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">delay_send</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">dontroute</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">exit_on_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">fd</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">high_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">high_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | <span style="color: #FF6600">inet</span>
+ | <span style="color: #FF6600">inet6</span>
+ | {<span style="color: #FF6600">ip</span>, <span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>()}
+ | {<span style="color: #FF6600">keepalive</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">linger</span>, {<span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}}
+ | {<span style="color: #FF6600">low_msgq_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">low_watermark</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">nodelay</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">port</span>, <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}
+ | {<span style="font-weight: bold"><span style="color: #000080">priority</span></span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}
+ | {<span style="color: #FF6600">raw</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(), <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
+ | {<span style="color: #FF6600">recbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">send_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
+ | {<span style="color: #FF6600">send_timeout_close</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
+ | {<span style="color: #FF6600">sndbuf</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
+ | {<span style="color: #FF6600">tos</span>, <span style="font-weight: bold"><span style="color: #000080">integer</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Listen options.</p></div>
+<div class="paragraph"><p>This does not represent the entirety of the options that can
+be set on the socket, but only the options that may be
+set independently of protocol implementation.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_opts_opt">opts() = [opt()]</h3>
+<div class="paragraph"><p>List of listen options.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_option_descriptions">Option descriptions</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>None of the options are required.</p></div>
+<div class="paragraph"><p>Please consult the <code>gen_tcp</code> and <code>inet</code> manuals for a more
+thorough description of these options. This manual only aims
+to provide a short description along with what the defaults
+are. Defaults may be different in Ranch compared to <code>gen_tcp</code>.
+Defaults are given next to the option name.</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+backlog (1024)
+</dt>
+<dd>
+<p>
+ Max length of the queue of pending connections.
+</p>
+</dd>
+<dt class="hdlist1">
+buffer
+</dt>
+<dd>
+<p>
+ Size of the buffer used by the Erlang driver. Default is system-dependent.
+</p>
+</dd>
+<dt class="hdlist1">
+delay_send (false)
+</dt>
+<dd>
+<p>
+ Always queue packets before sending, to send fewer, larger packets over the network.
+</p>
+</dd>
+<dt class="hdlist1">
+dontroute (false)
+</dt>
+<dd>
+<p>
+ Don&#8217;t send via a gateway, only send to directly connected hosts.
+</p>
+</dd>
+<dt class="hdlist1">
+exit_on_close (true)
+</dt>
+<dd>
+<p>
+ Disable to allow sending data after a close has been detected.
+</p>
+</dd>
+<dt class="hdlist1">
+fd
+</dt>
+<dd>
+<p>
+ File descriptor of the socket, if it was opened externally.
+</p>
+</dd>
+<dt class="hdlist1">
+high_msgq_watermark (8192)
+</dt>
+<dd>
+<p>
+ Limit in the amount of data in the socket message queue before the socket queue becomes busy.
+</p>
+</dd>
+<dt class="hdlist1">
+high_watermark (8192)
+</dt>
+<dd>
+<p>
+ Limit in the amount of data in the ERTS socket implementation&#8217;s queue before the socket becomes busy.
+</p>
+</dd>
+<dt class="hdlist1">
+inet
+</dt>
+<dd>
+<p>
+ Set up the socket for IPv4.
+</p>
+</dd>
+<dt class="hdlist1">
+inet6
+</dt>
+<dd>
+<p>
+ Set up the socket for IPv6.
+</p>
+</dd>
+<dt class="hdlist1">
+ip
+</dt>
+<dd>
+<p>
+ Interface to listen on. Listen on all interfaces by default.
+</p>
+</dd>
+<dt class="hdlist1">
+keepalive (false)
+</dt>
+<dd>
+<p>
+ Enable sending of keep-alive messages.
+</p>
+</dd>
+<dt class="hdlist1">
+linger ({false, 0})
+</dt>
+<dd>
+<p>
+ Whether to wait and how long to flush data sent before closing the socket.
+</p>
+</dd>
+<dt class="hdlist1">
+low_msgq_watermark (4096)
+</dt>
+<dd>
+<p>
+ Amount of data in the socket message queue before the socket queue leaves busy state.
+</p>
+</dd>
+<dt class="hdlist1">
+low_watermark (4096)
+</dt>
+<dd>
+<p>
+ Amount of data in the ERTS socket implementation&#8217;s queue before the socket leaves busy state.
+</p>
+</dd>
+<dt class="hdlist1">
+nodelay (true)
+</dt>
+<dd>
+<p>
+ Whether to enable TCP_NODELAY.
+</p>
+</dd>
+<dt class="hdlist1">
+port (0)
+</dt>
+<dd>
+<p>
+ TCP port number to listen on. 0 means a random port will be used.
+</p>
+</dd>
+<dt class="hdlist1">
+priority (0)
+</dt>
+<dd>
+<p>
+ Priority value for all packets to be sent by this socket.
+</p>
+</dd>
+<dt class="hdlist1">
+recbuf
+</dt>
+<dd>
+<p>
+ Minimum size of the socket&#8217;s receive buffer. Default is system-dependent.
+</p>
+</dd>
+<dt class="hdlist1">
+send_timeout (30000)
+</dt>
+<dd>
+<p>
+ How long the send call may wait for confirmation before returning.
+</p>
+</dd>
+<dt class="hdlist1">
+send_timeout_close (true)
+</dt>
+<dd>
+<p>
+ Whether to close the socket when the confirmation wasn&#8217;t received.
+</p>
+</dd>
+<dt class="hdlist1">
+sndbuf
+</dt>
+<dd>
+<p>
+ Minimum size of the socket&#8217;s send buffer. Default is system-dependent.
+</p>
+</dd>
+<dt class="hdlist1">
+tos
+</dt>
+<dd>
+<p>
+ Value for the IP_TOS IP level option. Use with caution.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>In addition, the <code>raw</code> option can be used to set system-specific
+options by specifying the protocol level, the option number and
+the actual option value specified as a binary. This option is not
+portable. Use with caution.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>None.</p></div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_transport/index.html b/docs/en/ranch/1.2/manual/ranch_transport/index.html
new file mode 100644
index 00000000..40b22b39
--- /dev/null
+++ b/docs/en/ranch/1.2/manual/ranch_transport/index.html
@@ -0,0 +1,628 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: ranch_transport(3)</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>ranch_transport(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>ranch_transport - behaviour for transport modules</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The <code>ranch_transport</code> behaviour defines the interface used
+by Ranch transports.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_sendfile_opts_chunk_size_non_neg_integer">sendfile_opts() = [{chunk_size, non_neg_integer()}]</h3>
+<div class="paragraph"><p>Options used by the sendfile function and callbacks.</p></div>
+<div class="paragraph"><p>Allows configuring the chunk size, in bytes. Defaults to 8191 bytes.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_callbacks">Callbacks</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_accept_lsocket_timeout_8594_ok_csocket_error_closed_timeout_atom">accept(LSocket, Timeout) &#8594; {ok, CSocket} | {error, closed | timeout | atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+LSocket = CSocket = any()
+</dt>
+<dd>
+<p>
+Listening socket.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+Accept timeout.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Accept a connection on the given listening socket.</p></div>
+<div class="paragraph"><p>The <code>accept_ack</code> callback will be used to initialize the socket
+after accepting the connection. This is most useful when the
+transport is not raw TCP, like with SSL for example.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_accept_ack_csocket_timeout_8594_ok">accept_ack(CSocket, Timeout) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+Ack timeout.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Perform post-accept initialization of the connection.</p></div>
+<div class="paragraph"><p>This function will be called by connection processes
+before performing any socket operation. It allows
+transports that require extra initialization to perform
+their task and make the socket ready to use.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_close_socket_8594_ok">close(Socket) &#8594; ok</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Socket = any()
+</dt>
+<dd>
+<p>
+Socket opened with listen/1 or accept/2.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Close the given socket.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_controlling_process_socket_pid_8594_ok_error_closed_not_owner_atom">controlling_process(Socket, Pid) &#8594; ok | {error, closed | not_owner | atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Socket = any()
+</dt>
+<dd>
+<p>
+Socket opened with listen/1 or accept/2.
+</p>
+</dd>
+<dt class="hdlist1">
+Pid = pid()
+</dt>
+<dd>
+<p>
+Pid of the new owner of the socket.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Change the controlling process for the given socket.</p></div>
+<div class="paragraph"><p>The controlling process is the process that is allowed to
+perform operations on the socket, and that will receive
+messages from the socket when active mode is used. When
+the controlling process dies, the socket is closed.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_listen_transopts_8594_ok_lsocket_error_atom">listen(TransOpts) &#8594; {ok, LSocket} | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+TransOpts = any()
+</dt>
+<dd>
+<p>
+Transport options.
+</p>
+</dd>
+<dt class="hdlist1">
+LSocket = any()
+</dt>
+<dd>
+<p>
+Listening socket.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Listen for connections on the given port.</p></div>
+<div class="paragraph"><p>The port is given as part of the transport options under
+the key <code>port</code>. Any other option is transport dependent.</p></div>
+<div class="paragraph"><p>The socket returned by this call can then be used to
+accept connections. It is not possible to send or receive
+data from the listening socket.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_messages_8594_ok_closed_error">messages() &#8594; {OK, Closed, Error}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+OK = Closed = Error = atom()
+</dt>
+<dd>
+<p>
+Tuple names.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the atoms used to identify messages sent in active mode.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_name_8594_name">name() &#8594; Name</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name = atom()
+</dt>
+<dd>
+<p>
+Transport module name.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the name of the transport.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_peername_csocket_8594_ok_ip_port_error_atom">peername(CSocket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+IP = inet:ip_address()
+</dt>
+<dd>
+<p>
+IP of the remote endpoint.
+</p>
+</dd>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Port of the remote endpoint.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the IP and port of the remote endpoint.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_recv_csocket_length_timeout_8594_ok_packet_error_closed_timeout_atom">recv(CSocket, Length, Timeout) &#8594; {ok, Packet} | {error, closed | timeout | atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+Length = non_neg_integer()
+</dt>
+<dd>
+<p>
+Requested length.
+</p>
+</dd>
+<dt class="hdlist1">
+Timeout = timeout()
+</dt>
+<dd>
+<p>
+Receive timeout.
+</p>
+</dd>
+<dt class="hdlist1">
+Packet = iodata() | any()
+</dt>
+<dd>
+<p>
+Data received.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Receive data from the given socket when in passive mode.</p></div>
+<div class="paragraph"><p>Trying to receive data from a socket that is in active mode
+will return an error.</p></div>
+<div class="paragraph"><p>A length of 0 will return any data available on the socket.</p></div>
+<div class="paragraph"><p>While it is possible to use the timeout value <code>infinity</code>,
+this is highly discouraged as this could cause your process
+to get stuck waiting for data that will never come. This may
+happen when a socket becomes half-open due to a crash of the
+remote endpoint. Wi-Fi going down is another common culprit
+of this issue.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_send_csocket_packet_8594_ok_error_atom">send(CSocket, Packet) &#8594; ok | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+Packet = iodata()
+</dt>
+<dd>
+<p>
+Data to be sent.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send data to the given socket.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_sendfile_csocket_file_8594_sendfile_csocket_file_0_0">sendfile(CSocket, File) &#8594; sendfile(CSocket, File, 0, 0, [])</h3>
+<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_sendfile_csocket_file_offset_bytes_8594_sendfile_csocket_file_offset_bytes">sendfile(CSocket, File, Offset, Bytes) &#8594; sendfile(CSocket, File, Offset, Bytes, [])</h3>
+<div class="paragraph"><p>Alias of <code>ranch_transport:sendfile/5</code>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_sendfile_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+File = file:filename_all() | file:fd()
+</dt>
+<dd>
+<p>
+Filename or file descriptor for the file to be sent.
+</p>
+</dd>
+<dt class="hdlist1">
+Offset = non_neg_integer()
+</dt>
+<dd>
+<p>
+Begin sending at this position in the file.
+</p>
+</dd>
+<dt class="hdlist1">
+Bytes = non_neg_integer()
+</dt>
+<dd>
+<p>
+Send this many bytes.
+</p>
+</dd>
+<dt class="hdlist1">
+SentBytes = non_neg_integer()
+</dt>
+<dd>
+<p>
+This many bytes were sent.
+</p>
+</dd>
+<dt class="hdlist1">
+SfOpts = sendfile_opts()
+</dt>
+<dd>
+<p>
+Sendfile options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
+<div class="paragraph"><p>The file may be sent full or in parts, and may be specified
+by its filename or by an already open file descriptor.</p></div>
+<div class="paragraph"><p>Transports that manipulate TCP directly may use the
+<code>file:sendfile/{2,4,5}</code> function, which calls the sendfile
+syscall where applicable (on Linux, for example). Other
+transports can use the <code>sendfile/6</code> function exported from
+this module.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_setopts_csocket_sockopts_8594_ok_error_atom">setopts(CSocket, SockOpts) &#8594; ok | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+SockOpts = any()
+</dt>
+<dd>
+<p>
+Socket options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Change options for the given socket.</p></div>
+<div class="paragraph"><p>This is mainly useful for switching to active or passive mode
+or to set protocol-specific options.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_shutdown_csocket_how_8594_ok_error_atom">shutdown(CSocket, How) &#8594; ok | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+How = read | write | read_write
+</dt>
+<dd>
+<p>
+Which side(s) of the socket to close.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Immediately close the socket in one or two directions.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_sockname_socket_8594_ok_ip_port_error_atom">sockname(Socket) &#8594; {ok, {IP, Port}} | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Socket = any()
+</dt>
+<dd>
+<p>
+Socket opened with listen/1 or accept/2.
+</p>
+</dd>
+<dt class="hdlist1">
+IP = inet:ip_address()
+</dt>
+<dd>
+<p>
+IP of the local endpoint.
+</p>
+</dd>
+<dt class="hdlist1">
+Port = inet:port_number()
+</dt>
+<dd>
+<p>
+Port of the local endpoint.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Return the IP and port of the local endpoint.</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_sendfile_transport_csocket_file_offset_bytes_sfopts_8594_ok_sentbytes_error_atom">sendfile(Transport, CSocket, File, Offset, Bytes, SfOpts) &#8594; {ok, SentBytes} | {error, atom()}</h3>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Transport = module()
+</dt>
+<dd>
+<p>
+Transport module for this socket.
+</p>
+</dd>
+<dt class="hdlist1">
+CSocket = any()
+</dt>
+<dd>
+<p>
+Socket for this connection.
+</p>
+</dd>
+<dt class="hdlist1">
+File = file:filename_all() | file:fd()
+</dt>
+<dd>
+<p>
+Filename or file descriptor for the file to be sent.
+</p>
+</dd>
+<dt class="hdlist1">
+Offset = non_neg_integer()
+</dt>
+<dd>
+<p>
+Begin sending at this position in the file.
+</p>
+</dd>
+<dt class="hdlist1">
+Bytes = non_neg_integer()
+</dt>
+<dd>
+<p>
+Send this many bytes.
+</p>
+</dd>
+<dt class="hdlist1">
+SentBytes = non_neg_integer()
+</dt>
+<dd>
+<p>
+This many bytes were sent.
+</p>
+</dd>
+<dt class="hdlist1">
+SfOpts = sendfile_opts()
+</dt>
+<dd>
+<p>
+Sendfile options.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>Send data from a file to the given socket.</p></div>
+<div class="paragraph"><p>This function emulates the function <code>file:sendfile/{2,4,5}</code>
+and may be used when transports are not manipulating TCP
+directly.</p></div>
+</div>
+</div>
+</div>
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Ranch
+ 1.2
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/ranch/1.2/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">1.2</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/index.html b/docs/en/ranch/index.html
new file mode 100644
index 00000000..c1eedb2f
--- /dev/null
+++ b/docs/en/ranch/index.html
@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><link rel="canonical" href="http://ninenines.eu/docs/"/><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta http-equiv="refresh" content="0;url=http://ninenines.eu/docs/" /></head></html> \ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 00000000..55161c52
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.15" />
+
+ <title>Nine Nines: Documentation</title>
+
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div class="span9 maincol">
+
+<h1 class="lined-header"><span>Documentation</span></h1>
+
+
+
+
+
+
+
+ <h2 id="cowboy">Cowboy</h2>
+ <ul>
+
+
+ <li><a href="/docs/en/cowboy/1.0/guide">Cowboy 1.0 User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">Cowboy 1.0 Function Reference</a></li>
+
+
+
+ <li><a href="/docs/en/cowboy/2.0/guide">Cowboy 2.0 User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Cowboy 2.0 Function Reference</a></li>
+
+
+ </ul>
+
+
+
+
+
+
+ <h2 id="erlang.mk">Erlang.mk</h2>
+ <ul><li><a href="http://erlang.mk">Official website</a></li></ul>
+
+
+
+
+
+ <h2 id="gun">Gun</h2>
+ <ul>
+
+
+ <li><a href="/docs/en/gun/1.0/guide">Gun 1.0 User Guide</a></li>
+
+
+ <li><a href="/docs/en/gun/1.0/manual">Gun 1.0 Function Reference</a></li>
+
+
+ </ul>
+
+
+
+
+ <h2 id="ranch">Ranch</h2>
+ <ul>
+
+
+ <li><a href="/docs/en/ranch/1.2/guide">Ranch 1.2 User Guide</a></li>
+
+
+ <li><a href="/docs/en/ranch/1.2/manual">Ranch 1.2 Function Reference</a></li>
+
+
+ </ul>
+
+
+
+</div>
+<div class="span3 sidecol">
+<h3>Navigation</h3>
+<ul>
+
+
+
+
+ <li><a href="#cowboy">Cowboy</a></li>
+
+
+
+
+
+ <li><a href="#erlang.mk">Erlang.mk</a></li>
+
+
+
+ <li><a href="#gun">Gun</a></li>
+
+
+
+ <li><a href="#ranch">Ranch</a></li>
+
+
+</ul>
+
+<div class="sect2">
+<h3 id="_contribute">Contribute</h3>
+<div class="paragraph"><p>Do you have examples, tutorials, videos about one or more
+of my projects? I would happily include them on this page.</p></div>
+<div class="paragraph"><p><a href="mailto:[email protected]">Send me an email with the details</a>.</p></div>
+</div>
+
+</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 &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
diff --git a/docs/index.xml b/docs/index.xml
new file mode 100644
index 00000000..b62edf2e
--- /dev/null
+++ b/docs/index.xml
@@ -0,0 +1,2001 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>Docs on Nine Nines</title>
+ <link>http://ninenines.eu/docs/</link>
+ <description>Recent content in Docs on Nine Nines</description>
+ <generator>Hugo -- gohugo.io</generator>
+ <language>en-us</language>
+ <atom:link href="http://ninenines.eu/docs/index.xml" rel="self" type="application/rss+xml" />
+
+ <item>
+ <title>Architecture</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/architecture/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy is a lightweight HTTP server.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It is built on top of Ranch. Please see the Ranch guide for more
+information.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_one_process_per_connection&#34;&gt;One process per connection&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_binaries&#34;&gt;Binaries&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_date_header&#34;&gt;Date header&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Because querying for the current date and time can be expensive,
+Cowboy generates one &lt;code&gt;Date&lt;/code&gt; 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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_max_connections&#34;&gt;Max connections&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Disabling this feature, by setting the &lt;code&gt;{max_connections, infinity}&lt;/code&gt;
+protocol option, would give you greater performance when you are
+only processing short-lived requests.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>AsciiDoc documentation</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides rules for generating documentation from
+AsciiDoc files. It can automatically build a user guide PDF,
+chunked HTML documentation and Unix manual pages.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_requirements&#34;&gt;Requirements&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It is necessary to have &lt;a href=&#34;http://asciidoc.org/&#34;&gt;AsciiDoc&lt;/a&gt;,
+&lt;a href=&#34;http://xmlsoft.org/XSLT/xsltproc2.html&#34;&gt;xsltproc&lt;/a&gt; and
+&lt;a href=&#34;http://dblatex.sourceforge.net/&#34;&gt;dblatex&lt;/a&gt; installed on your
+system for Erlang.mk to generate documentation from AsciiDoc sources.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_writing_asciidoc_documentation&#34;&gt;Writing AsciiDoc documentation&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;http://asciidoc.org/&#34;&gt;AsciiDoc&lt;/a&gt; is a text document format for
+writing notes, documentation, articles, books, ebooks, slideshows,
+web pages, man pages and blogs. AsciiDoc files can be translated
+to many formats including HTML, PDF, EPUB, man page.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;a href=&#34;http://asciidoc.org/userguide.html&#34;&gt;AsciiDoc user guide&lt;/a&gt;
+describes the AsciiDoc syntax.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;a href=&#34;https://github.com/ninenines/erlang.mk/tree/master/doc/src/guide&#34;&gt;Erlang.mk user guide&lt;/a&gt;
+is written in AsciiDoc and can be used as an example. The entry
+file is &lt;a href=&#34;https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc&#34;&gt;book.asciidoc&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk expects you to put your documentation in a specific
+location. This is &lt;em&gt;doc/src/guide/&lt;/em&gt; for the user guide, and
+&lt;em&gt;doc/src/manual/&lt;/em&gt; for the function reference. In the case of
+the user guide, the entry point is always &lt;em&gt;doc/src/guide/book.asciidoc&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;For manual pages, it is good practice to use section 3 for
+modules, and section 7 for the application itself.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_configuration&#34;&gt;Configuration&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;All of the AsciiDoc related configuration can be done directly
+inside the files themselves.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_usage&#34;&gt;Usage&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build all documentation:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make docs&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build only the AsciiDoc documentation:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make asciidoc&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build only the user guide:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make asciidoc-guide&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build only the manual:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make asciidoc-manual&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To install man pages on Unix:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make install-docs&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk allows customizing the installation path and sections
+of the man pages to be installed. The &lt;code&gt;MAN_INSTALL_PATH&lt;/code&gt; variable
+defines where man pages will be installed. It defaults to
+&lt;em&gt;/usr/local/share/man&lt;/em&gt;. The &lt;code&gt;MAN_SECTIONS&lt;/code&gt; variable defines
+which manual sections are to be installed. It defaults to &lt;code&gt;3 7&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To install man pages to a custom location:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make install-docs &lt;span style=&#34;color: #009900&#34;&gt;MAN_INSTALL_PATH&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;/opt/share/man&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that you may need to run the install commands using
+&lt;code&gt;sudo&lt;/code&gt; or equivalent if the location is not writeable by
+your user.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Building</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/app/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/app/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk can do a lot of things, but it is, first and
+foremost, a build tool. In this chapter we will cover
+the basics of building a project with Erlang.mk.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;For most of this chapter, we will assume that you are
+using a project &lt;a href=&#34;../getting_started&#34;&gt;generated by Erlang.mk&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_how_to_build&#34;&gt;How to build&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build a project, all you have to do is type &lt;code&gt;make&lt;/code&gt;:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It will work regardless of your project: OTP applications,
+library applications, NIFs, port drivers or even releases.
+Erlang.mk also automatically downloads and compiles the
+dependencies for your project.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;All this is possible thanks to a combination of configuration
+and conventions. Most of the conventions come from Erlang/OTP
+itself so any seasoned Erlang developers should feel right at
+home.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_what_to_build&#34;&gt;What to build&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk gives you control over three steps of the build
+process, allowing you to do a partial build if needed.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A build has three phases: first any dependency is fetched
+and built, then the project itself is built and finally a
+release may be generated when applicable. A release is only
+generated for projects specifically configured to do so.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk handles those three phases automatically when you
+type &lt;code&gt;make&lt;/code&gt;. But sometimes you just want to repeat one or
+two of them.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The commands detailed in this section are most useful after
+you have a successful build as they allow you to quickly
+redo a step instead of going through everything. This is
+especially useful for large projects or projects that end
+up generating releases.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_application&#34;&gt;Application&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can build your application and dependencies without
+generating a release by running the following command:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make app&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build your application without touching dependencies
+at all, you can use the &lt;code&gt;SKIP_DEPS&lt;/code&gt; variable:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make app &lt;span style=&#34;color: #009900&#34;&gt;SKIP_DEPS&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color: #993399&#34;&gt;1&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This command is very useful if you have a lot of dependencies
+and develop on a machine with slow file access, like the
+Raspberry Pi and many other embedded devices.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that this command may fail if a required dependency
+is missing.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can build all dependencies, and nothing else, by
+running the following command:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make deps&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This will fetch and compile all dependencies and their
+dependencies, recursively.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../deps&#34;&gt;Packages and dependencies&lt;/a&gt; are covered
+in the next chapter.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_release&#34;&gt;Release&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;It is not possible to build the release without at least
+building the application itself, unless of course if there&amp;#8217;s
+no application to begin with.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To generate the release, &lt;code&gt;make&lt;/code&gt; will generally suffice with
+a normal Erlang.mk. A separate target is however available,
+and will take care of building the release, after building
+the application and all dependencies:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make rel&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Consult the &lt;a href=&#34;../relx&#34;&gt;Releases&lt;/a&gt; chapter for more
+information about what releases are and how they are generated.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_application_resource_file&#34;&gt;Application resource file&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When building your application, Erlang.mk will generate the
+&lt;a href=&#34;http://www.erlang.org/doc/man/app.html&#34;&gt;application resource file&lt;/a&gt;.
+This file is mandatory for all Erlang applications and is
+found in &lt;em&gt;ebin/$(PROJECT).app&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;code&gt;PROJECT&lt;/code&gt; is a variable defined in your Makefile and taken
+from the name of the directory when Erlang.mk bootstraps
+your project.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk can build the &lt;em&gt;ebin/$(PROJECT).app&lt;/em&gt; in two different
+ways: from the configuration found in the Makefile, or from
+the &lt;em&gt;src/$(PROJECT).app.src&lt;/em&gt; file.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_application_configuration&#34;&gt;Application configuration&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk automatically fills the &lt;code&gt;PROJECT&lt;/code&gt; variable when
+bootstrapping a new project, but everything else is up to
+you. None of the values are required to build your project,
+although it is recommended to fill everything relevant to
+your situation.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;dlist&#34;&gt;&lt;dl&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;PROJECT&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ The name of the OTP application or library.
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;PROJECT_DESCRIPTION&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ Short description of the project.
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;PROJECT_VERSION&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ Current version of the project.
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;PROJECT_REGISTERED&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ List of the names of all registered processes.
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;LOCAL_DEPS&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ List of Erlang/OTP applications this project depends on,
+ excluding &lt;code&gt;erts&lt;/code&gt;, &lt;code&gt;kernel&lt;/code&gt; and &lt;code&gt;stdlib&lt;/code&gt;, or list of
+ dependencies local to this repository (in &lt;code&gt;APPS_DIR&lt;/code&gt;).
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;dt class=&#34;hdlist1&#34;&gt;
+&lt;code&gt;DEPS&lt;/code&gt;
+&lt;/dt&gt;
+&lt;dd&gt;
+&lt;p&gt;
+ List of applications this project depends on that need
+ to be fetched by Erlang.mk.
+&lt;/p&gt;
+&lt;/dd&gt;
+&lt;/dl&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;There&amp;#8217;s no need for quotes or anything. The relevant part of
+the Cowboy Makefile follows, if you need an example:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;PROJECT =&lt;/span&gt; cowboy
+&lt;span style=&#34;color: #009900&#34;&gt;PROJECT_DESCRIPTION =&lt;/span&gt; Small&lt;span style=&#34;color: #990000&#34;&gt;,&lt;/span&gt; fast&lt;span style=&#34;color: #990000&#34;&gt;,&lt;/span&gt; modular HTTP server&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;
+&lt;span style=&#34;color: #009900&#34;&gt;PROJECT_VERSION =&lt;/span&gt; 2.0.0-pre.2
+&lt;span style=&#34;color: #009900&#34;&gt;PROJECT_REGISTERED =&lt;/span&gt; cowboy_clock
+
+&lt;span style=&#34;color: #009900&#34;&gt;LOCAL_DEPS =&lt;/span&gt; crypto
+&lt;span style=&#34;color: #009900&#34;&gt;DEPS =&lt;/span&gt; cowlib ranch&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Any space before and after the value is dropped.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;a href=&#34;../deps&#34;&gt;Dependencies&lt;/a&gt; are covered in details in
+the next chapter.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_legacy_method&#34;&gt;Legacy method&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;em&gt;src/$(PROJECT).app.src&lt;/em&gt; file is a legacy method of
+building Erlang applications. It was introduced by the original
+&lt;code&gt;rebar&lt;/code&gt; build tool, of which Erlang.mk owes a great deal as it
+is its main inspiration.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;em&gt;.app.src&lt;/em&gt; file serves as a template to generate the &lt;em&gt;.app&lt;/em&gt;
+file. Erlang.mk will take it, fill in the &lt;code&gt;modules&lt;/code&gt; value
+dynamically, and save the result in &lt;em&gt;ebin/$(PROJECT).app&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When using this method, Erlang.mk cannot fill the &lt;code&gt;applications&lt;/code&gt;
+key from dependencies automatically, which means you need to
+add them to Erlang.mk and to the &lt;em&gt;.app.src&lt;/em&gt; at the same time,
+duplicating the work.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you really can&amp;#8217;t live without the legacy method, for one
+reason or another, worry not; Erlang.mk will support it. And
+if you need to create a new project that uses this method, you
+just have to say so when bootstrapping:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make -f erlang&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;mk bootstrap-lib &lt;span style=&#34;color: #009900&#34;&gt;LEGACY&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color: #993399&#34;&gt;1&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_automatic_application_resource_file_values&#34;&gt;Automatic application resource file values&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When building the application resource file, Erlang.mk may
+automatically add an &lt;code&gt;id&lt;/code&gt; key with information about the
+Git commit (if using Git), or an empty string otherwise.
+It will only do this under specific conditions:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+The application was built as a dependency of another, or
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+The legacy method was used, and the &lt;em&gt;.app.src&lt;/em&gt; file contained &lt;code&gt;{id, &#34;git&#34;}&lt;/code&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This value is most useful when you need to help your users,
+as it allows you to know which version they run exactly by
+asking them to look in the file, or by running a simple
+command on their production server:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #993399&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;application:get_all_key&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;cowboy&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;,[{&lt;span style=&#34;color: #FF6600&#34;&gt;description&lt;/span&gt;,&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;Small, fast, modular HTTP server.&#34;&lt;/span&gt;},
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;id&lt;/span&gt;,&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;2.0.0-pre.2-25-g0ffde50-dirty&#34;&lt;/span&gt;},&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_file_formats&#34;&gt;File formats&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk supports a variety of different source file formats.
+The following formats are supported natively:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;tableblock&#34;&gt;
+&lt;table rules=&#34;all&#34;
+width=&#34;100%&#34;
+frame=&#34;border&#34;
+cellspacing=&#34;0&#34; cellpadding=&#34;4&#34;&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;thead&gt;
+&lt;tr&gt;
+&lt;th align=&#34;left&#34; valign=&#34;top&#34;&gt; Extension &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Location &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Description &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Output&lt;/th&gt;
+&lt;/tr&gt;
+&lt;/thead&gt;
+&lt;tbody&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.erl&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Erlang source&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;ebin/*.beam&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.core&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Core Erlang source&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;ebin/*.beam&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.xrl&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Leex source&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/*.erl&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.yrl&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Yecc source&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/*.erl&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.asn1&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;asn1/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;ASN.1 files&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;include/&lt;strong&gt;.hrl include/&lt;/strong&gt;.asn1db src/*.erl&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.mib&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;mibs/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;SNMP MIB files&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;include/&lt;strong&gt;.hrl priv/mibs/&lt;/strong&gt;.bin&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/tbody&gt;
+&lt;/table&gt;
+&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Files are always searched recursively.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The build is ordered, so that files that generate Erlang source
+files are run before, and the resulting Erlang source files are
+then built normally.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In addition, Erlang.mk keeps track of header files (&lt;code&gt;.hrl&lt;/code&gt;)
+as described at the end of this chapter. It can also compile
+C code, as described in the &lt;a href=&#34;../ports&#34;&gt;NIFs and port drivers&lt;/a&gt;
+chapter.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk also comes with plugins for the following formats:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;tableblock&#34;&gt;
+&lt;table rules=&#34;all&#34;
+width=&#34;100%&#34;
+frame=&#34;border&#34;
+cellspacing=&#34;0&#34; cellpadding=&#34;4&#34;&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;col width=&#34;25%&#34; /&gt;
+&lt;thead&gt;
+&lt;tr&gt;
+&lt;th align=&#34;left&#34; valign=&#34;top&#34;&gt; Extension &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Location &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Description &lt;/th&gt;
+&lt;th align=&#34;center&#34; valign=&#34;top&#34;&gt; Output&lt;/th&gt;
+&lt;/tr&gt;
+&lt;/thead&gt;
+&lt;tbody&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.dtl&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;templates/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Django templates&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;ebin/*.beam&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;.proto&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;src/&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Protocol buffers&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;center&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;ebin/*.beam&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/tbody&gt;
+&lt;/table&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_compilation_options&#34;&gt;Compilation options&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides a few variables that you can use to customize
+the build process and the resulting files.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_erlc_opts&#34;&gt;ERLC_OPTS&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;code&gt;ERLC_OPTS&lt;/code&gt; can be used to pass some options to &lt;code&gt;erlc&lt;/code&gt;, the Erlang
+compiler. Erlang.mk does not restrict any option. Please refer to
+the &lt;a href=&#34;http://www.erlang.org/doc/man/erlc.html&#34;&gt;erlc Manual&lt;/a&gt; for the
+full list.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;By default, Erlang.mk will set the following options:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;ERLC_OPTS =&lt;/span&gt; -Werror &lt;span style=&#34;color: #990000&#34;&gt;+&lt;/span&gt;debug_info &lt;span style=&#34;color: #990000&#34;&gt;+&lt;/span&gt;warn_export_vars &lt;span style=&#34;color: #990000&#34;&gt;+&lt;/span&gt;warn_shadow_vars &lt;span style=&#34;color: #990000&#34;&gt;+&lt;/span&gt;warn_obsolete_guard&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In other words: warnings as errors, debug info (recommended) and
+enable warnings for exported variables, shadow variables and
+obsolete guard functions.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can redefine this variable in your Makefile to change it
+completely, either before or after including Erlang.mk:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;ERLC_OPTS =&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;+&lt;/span&gt;debug_info&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can also filter out some options from the defaults Erlang.mk
+sets, by defining ERLC_OPTS after including Erlang.mk using the
+&lt;code&gt;:=&lt;/code&gt; operator.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;include erlang.mk
+
+&lt;span style=&#34;color: #990000&#34;&gt;ERLC_OPTS :=&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;$(&lt;/span&gt;filter-out -Werror&lt;span style=&#34;color: #990000&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color: #009900&#34;&gt;$(ERLC_OPTS))&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_erlc_exclude&#34;&gt;ERLC_EXCLUDE&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;code&gt;ERLC_EXCLUDE&lt;/code&gt; can be used to exclude some modules from the
+compilation. It&amp;#8217;s there for handling special cases, you should
+not normally need it.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To exclude a module, simply list it in the variable, either
+before or after including Erlang.mk:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;ERLC_EXCLUDE =&lt;/span&gt; cowboy_http2&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_cold_and_hot_builds&#34;&gt;Cold and hot builds&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The first time you run &lt;code&gt;make&lt;/code&gt;, Erlang.mk will build everything.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The second time you run &lt;code&gt;make&lt;/code&gt;, and all subsequent times, Erlang.mk
+will only rebuild what changed. Erlang.mk has been optimized for
+this use case, as it is the most common during development.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk figures out what changed by using the dependency tracking
+feature of Make. Make automatically rebuilds a target if one of its
+dependency has changed (for example if a header file has changed,
+all the source files that include it will be rebuilt), and Erlang.mk
+leverages this feature to cut down on rebuild times.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that this applies only to building; some other features of
+Erlang.mk will run every time they are called regardless of files
+changed.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_dependency_tracking&#34;&gt;Dependency tracking&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;admonitionblock&#34;&gt;
+&lt;table&gt;&lt;tr&gt;
+&lt;td class=&#34;icon&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Note&lt;/div&gt;
+&lt;/td&gt;
+&lt;td class=&#34;content&#34;&gt;This section is about the dependency tracking between files
+inside your project, not application dependencies.&lt;/td&gt;
+&lt;/tr&gt;&lt;/table&gt;
+&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk keeps track of the dependencies between the different
+files in your project. This information is kept in the &lt;em&gt;$(PROJECT).d&lt;/em&gt;
+file in your directory. It is generated if missing, and will be
+generated again after every file change, by default.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Dependency tracking is what allows Erlang.mk to know when to
+rebuild Erlang files when header files, behaviors or parse
+transforms have changed. Erlang.mk also automatically keeps
+track of which files should be compiled first, for example
+when you have behaviors used by other modules in your project.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If your project is stable, you may want to disable generating
+the dependency tracking file every time you compile. You can
+do this by adding the following line to your &lt;em&gt;Makefile&lt;/em&gt;:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;NO_MAKEDEP &lt;span style=&#34;color: #990000&#34;&gt;?=&lt;/span&gt; &lt;span style=&#34;color: #993399&#34;&gt;1&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;As you can see, the snippet above uses &lt;code&gt;?=&lt;/code&gt; instead of a
+simple equal sign. This is to allow you to temporarily override
+this value when you do make substantial changes to your project
+(including a new header file, new module with dependencies, etc.)
+and want to rebuild the dependency tracking file. You&amp;#8217;ll be
+able to use the following command:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ &lt;span style=&#34;color: #009900&#34;&gt;NO_MAKEDEP&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; make&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Otherwise, &lt;code&gt;make clean app&lt;/code&gt; will of course force the
+recompilation of your project.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk can also keep track of the source files generated
+by other means, for example if you generate code from a data
+file in your repository.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_generating_erlang_source&#34;&gt;Generating Erlang source&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides hooks at different stages of the build process.
+When your goal is to generate Erlang source files, you can
+add your own rules before or after the dependency tracking
+file is generated. To do this, you would add your hook before
+or after including the &lt;em&gt;erlang.mk&lt;/em&gt; file.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The easiest way is after:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;PROJECT =&lt;/span&gt; example
+
+include erlang.mk
+
+&lt;span style=&#34;color: #009900&#34;&gt;$(PROJECT)&lt;/span&gt;.d&lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; src/generated_mod.erl
+
+src/generated_mod.erl&lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; gen-mod.sh
+ &lt;span style=&#34;color: #009900&#34;&gt;$(gen_verbose)&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;/gen-mod.sh &lt;span style=&#34;color: #009900&#34;&gt;$@&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In this case we use &lt;code&gt;$(gen_verbose)&lt;/code&gt; to hide the details of
+the build by default. Erlang.mk will simply say what file
+is it currently generating.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When using an external script to generate the Erlang source
+file, it is recommended to depend on that script, so that
+the source file gets generated again when the script gets
+modified.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If for whatever reason you prefer to hook before including
+Erlang.mk, don&amp;#8217;t forget to set the &lt;code&gt;.DEFAULT_GOAL&lt;/code&gt; variable,
+otherwise nothing will get built:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;PROJECT =&lt;/span&gt; example
+
+.DEFAULT_GOAL &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; all
+
+&lt;span style=&#34;color: #009900&#34;&gt;$(PROJECT)&lt;/span&gt;.d&lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; src/generated_mod.erl
+
+include erlang.mk
+
+src/generated_mod.erl&lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; gen-mod.sh
+ &lt;span style=&#34;color: #009900&#34;&gt;$(gen_verbose)&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;/gen-mod.sh &lt;span style=&#34;color: #009900&#34;&gt;$@&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_cleaning&#34;&gt;Cleaning&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Building typically involves creating a lot of new files. Some
+are reused in rebuilds, some are simply replaced. All can be
+removed safely.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides two commands to remove them: &lt;code&gt;clean&lt;/code&gt; and
+&lt;code&gt;distclean&lt;/code&gt;. &lt;code&gt;clean&lt;/code&gt; removes all the intermediate files that
+were created as a result of building, including the BEAM files,
+the dependency tracking file and the generated documentation.
+&lt;code&gt;distclean&lt;/code&gt; removes these and more, including the downloaded
+dependencies, Dialyzer&amp;#8217;s PLT file and the generated release,
+putting your directory back to the state it was before you
+started working on it.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To clean:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make clean&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Or distclean:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make distclean&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;That is the question.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that Erlang.mk will automatically clean some files as
+part of other targets, but it will never run &lt;code&gt;distclean&lt;/code&gt; if
+you don&amp;#8217;t explicitly use it.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Code coverage</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Placeholder chapter.&lt;/p&gt;&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Common Test</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/common_test/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Common Test is Erlang&amp;#8217;s functional testing framework.
+Erlang.mk automates the discovery and running of Common
+Test suites.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_writing_tests&#34;&gt;Writing tests&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;a href=&#34;http://www.erlang.org/doc/apps/common_test/write_test_chapter.html&#34;&gt;Common Test user guide&lt;/a&gt;
+is the best place to learn how to write tests. Erlang.mk
+requires that file names for test suites end with &lt;em&gt;_SUITE.erl&lt;/em&gt;
+and that the files be located in the &lt;em&gt;$(TEST_DIR)&lt;/em&gt; directory.
+This defaults to &lt;em&gt;test/&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_configuration&#34;&gt;Configuration&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;CT_OPTS&lt;/code&gt; variable allows you to set extra Common Test
+options. Options are documented in the
+&lt;a href=&#34;http://www.erlang.org/doc/apps/common_test/run_test_chapter.html&#34;&gt;Common Test user guide&lt;/a&gt;.
+You can use it to set Common Test hooks, for example:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;CT_OPTS =&lt;/span&gt; -ct_hooks cowboy_ct_hook&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;CT_SUITES&lt;/code&gt; variable can be used to override what
+Common Test suites Erlang.mk will be aware of. It does
+not normally need to be set as Erlang.mk will find the
+test suites automatically.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The name of the suite is the part before &lt;code&gt;_SUITE.erl&lt;/code&gt;.
+If the file is named &lt;em&gt;http_SUITE.erl&lt;/em&gt;, the test suite
+is &lt;code&gt;http&lt;/code&gt;:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;CT_SUITES =&lt;/span&gt; http ws&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_usage&#34;&gt;Usage&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To run all tests (including Common Test):&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make tests&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To run all tests and static checks (including Common Test):&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make check&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can also run Common Test separately:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make ct&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk will create targets for all test suites it finds.
+If you have a file named &lt;em&gt;test/http_SUITE.erl&lt;/em&gt;, then the
+target &lt;code&gt;ct-http&lt;/code&gt; will run that specific test suite:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make ct-http&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides a convenient way to run a specific
+group or a specific test case within a specific group,
+using the variable &lt;code&gt;t&lt;/code&gt;. Note that this only applies to
+suite-specific targets, like the &lt;code&gt;ct-http&lt;/code&gt; example above.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To run all tests from the &lt;code&gt;http_compress&lt;/code&gt; group in the
+&lt;code&gt;http_SUITE&lt;/code&gt; test suite, write:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make ct-http &lt;span style=&#34;color: #009900&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;http_compress&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Similarly, to run a specific test case in that group:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make ct-http &lt;span style=&#34;color: #009900&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;http_compress&lt;span style=&#34;color: #990000&#34;&gt;:&lt;/span&gt;headers_dupe&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To do the same against a multi-application repository,
+you can use the &lt;code&gt;-C&lt;/code&gt; option:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make -C apps/my_app ct-http &lt;span style=&#34;color: #009900&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;my_group&lt;span style=&#34;color: #990000&#34;&gt;:&lt;/span&gt;my_case&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that this also applies to dependencies. When using Cowboy
+as a dependency, you can run the following directly:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make -C deps/cowboy ct-http &lt;span style=&#34;color: #009900&#34;&gt;t&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt;http_compress&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Finally, &lt;a href=&#34;../coverage&#34;&gt;code coverage&lt;/a&gt; is available,
+but covered in its own chapter.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Compatibility with other build tools</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/compat/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/compat/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk tries its best to be compatible with the other Erlang
+build tools. It can use dependencies written with other build
+tools in mind, and can also make your projects usable by those
+build tools as well. Erlang.mk is like the cool kid that gets
+along with everybody.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In this chapter I will use the term &lt;em&gt;Rebar project&lt;/em&gt; to refer
+to a project built using Rebar 2, Rebar 3 or Mad. These three
+build tools are very similar and share the same configuration
+file.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_rebar_projects_as_erlang_mk_dependencies&#34;&gt;Rebar projects as Erlang.mk dependencies&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk comes with a feature called &lt;em&gt;Autoload&lt;/em&gt; which will
+use Rebar 2 to patch any Rebar project and make it compatible
+with Erlang.mk. This feature essentially patches Rebar out
+and adds a Makefile to the project that Erlang.mk can then
+use for building:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;&lt;em&gt;Autoload&lt;/em&gt; is documented in more details in the
+&lt;a href=&#34;../deps&#34;&gt;Packages and dependencies&lt;/a&gt; chapter.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_erlang_mk_projects_as_rebar_dependencies&#34;&gt;Erlang.mk projects as Rebar dependencies&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk projects can be made compatible with the Rebar family
+of build tools pretty easily, as Erlang.mk will generate
+all the files they require for building.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The Rebar family requires two files: a &lt;em&gt;rebar.config&lt;/em&gt; file
+containing compilation options and the list of dependencies,
+and the application resource file, found either at
+&lt;em&gt;ebin/$(PROJECT).app&lt;/em&gt; or at &lt;em&gt;src/$(PROJECT).app.src&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_rebar_configuration&#34;&gt;Rebar configuration&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk comes with a target that generates a &lt;em&gt;rebar.config&lt;/em&gt;
+file when invoked:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make rebar&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;config&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Careful! This will build the file even if it already existed
+before.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To build this file, Erlang.mk uses information it finds in
+the &lt;code&gt;DEPS&lt;/code&gt; and &lt;code&gt;ERLC_OPTS&lt;/code&gt; variables, among others. This
+means that the Rebar family builds your project much the
+same way as Erlang.mk.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Careful though! Different build tools have different fetching
+strategies. If some applications provide differing dependencies,
+they might be fetched differently by other build tools. Check
+the upcoming Sanity check chapter to find out how to detect such
+issues.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can automatically generate this file when you build
+your application, by making it a dependency of the &lt;code&gt;app&lt;/code&gt;
+target:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #990000&#34;&gt;app::&lt;/span&gt; rebar.config&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Don&amp;#8217;t forget to commit the file when it changes!&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you run into other issues, it&amp;#8217;s probably because you use a
+feature specific to Erlang.mk, like the &lt;code&gt;cp&lt;/code&gt; fetch method.
+It could also be that we forgot to handle something! Sorry.
+We are of course interested to hear about any compatibility
+problems you may have, just open a ticket!&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect3&#34;&gt;
+&lt;h4 id=&#34;_application_resource_file&#34;&gt;Application resource file&lt;/h4&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk has two ways to generate an application resource
+file: from the information found in the Makefile, or from
+the information found in the &lt;em&gt;src/$(PROJECT).app.src&lt;/em&gt; file.
+Needless to say, if you have this file in your repository,
+then you don&amp;#8217;t need to worry about compatibility with other
+build tools.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you don&amp;#8217;t, however, it&amp;#8217;s not much harder. Every time
+Erlang.mk will compile your application, it will produce
+a new &lt;em&gt;ebin/$(PROJECT).app&lt;/em&gt; file. Simply commit this file
+when it changes. It will only change when you modify the
+configuration, add or remove modules.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Connection</title>
+ <link>http://ninenines.eu/docs/en/gun/1.0/guide/connect/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/gun/1.0/guide/connect/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This chapter describes how to open, monitor and close
+a connection using the Gun client.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_gun_connections&#34;&gt;Gun connections&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Gun is designed with the SPDY and Websocket protocols in mind.
+They are built for long-running connections that allow concurrent
+exchange of data, either in the form of request/responses for
+SPDY or in the form of messages for Websocket.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A Gun connection is an Erlang process that manages a socket to
+a remote endpoint. This Gun connection is owned by a user
+process that is called the &lt;em&gt;owner&lt;/em&gt; of the connection, and is
+managed by the supervision tree of the &lt;code&gt;gun&lt;/code&gt; application.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The owner process communicates with the Gun connection
+by calling functions from the module &lt;code&gt;gun&lt;/code&gt;. All functions
+perform their respective operations asynchronously. The Gun
+connection will send Erlang messages to the owner process
+whenever needed.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When the remote endpoint closes the connection, Gun attempts
+to reconnect automatically.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_opening_a_new_connection&#34;&gt;Opening a new connection&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;gun:open/{2,3}&lt;/code&gt; function must be used to open a connection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Opening a connection to example.org on port 443&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:open&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;example.org&#34;&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;443&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If the port given is 443, Gun will attempt to connect using
+SSL. The protocol will be selected automatically using the
+NPN extension for TLS. By default Gun supports SPDY/3.1,
+SPDY/3 and HTTP/1.1 when connecting using SSL.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;For any other port, Gun will attempt to connect using TCP
+and will use the HTTP/1.1 protocol.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The transport and protocol used can be overriden using
+options. The manual documents all available options.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Options can be provided as a third argument, and take the
+form of a map.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Opening an SSL connection to example.org on port 8443&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:open&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;example.org&#34;&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;8443&lt;/span&gt;, #{&lt;span style=&#34;color: #0000FF&#34;&gt;transport&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&#34;color: #FF6600&#34;&gt;ssl&lt;/span&gt;})&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_waiting_for_the_connection_to_be_established&#34;&gt;Waiting for the connection to be established&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When Gun successfully connects to the server, it sends a
+&lt;code&gt;gun_up&lt;/code&gt; message with the protocol that has been selected
+for the connection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Gun provides the functions &lt;code&gt;gun:await_up/{1,2,3}&lt;/code&gt; that wait
+for the &lt;code&gt;gun_up&lt;/code&gt; message. They can optionally take a monitor
+reference and/or timeout value. If no monitor is provided,
+one will be created for the duration of the function call.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Synchronous opening of a connection&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:open&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;example.org&#34;&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;443&lt;/span&gt;),
+{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Protocol&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:await_up&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_handling_connection_loss&#34;&gt;Handling connection loss&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When the connection is lost, Gun will send a &lt;code&gt;gun_down&lt;/code&gt;
+message indicating the current protocol, the reason the
+connection was lost and two list of stream references.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The first list indicates open streams that &lt;em&gt;may&lt;/em&gt; have been
+processed by the server. The second list indicates open
+streams that the server did not process.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_monitoring_the_connection_process&#34;&gt;Monitoring the connection process&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;@todo Gun should detect the owner process being killed&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Because software errors are unavoidable, it is important to
+detect when the Gun process crashes. It is also important
+to detect when it exits normally. Erlang provides two ways
+to do that: links and monitors.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Gun leaves you the choice as to which one will be used.
+However, if you use the &lt;code&gt;gun:await/{2,3}&lt;/code&gt; or &lt;code&gt;gun:await_body/{2,3}&lt;/code&gt;
+functions, a monitor may be used for you to avoid getting
+stuck waiting for a message that will never come.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you choose to monitor yourself you can do it on a permanent
+basis rather than on every message you will receive, saving
+resources. Indeed, the &lt;code&gt;gun:await/{3,4}&lt;/code&gt; and &lt;code&gt;gun:await_body/{3,4}&lt;/code&gt;
+functions both accept a monitor argument if you have one already.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Monitoring the connection process&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;{&lt;span style=&#34;color: #FF6600&#34;&gt;ok&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:open&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;example.org&#34;&lt;/span&gt;, &lt;span style=&#34;color: #993399&#34;&gt;443&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;
+&lt;span style=&#34;color: #009900&#34;&gt;MRef&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;monitor&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;process&lt;/span&gt;&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This monitor reference can be kept and used until the connection
+process exits.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Handling &lt;code&gt;DOWN&lt;/code&gt; messages&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #0000FF&#34;&gt;receive&lt;/span&gt;&lt;/span&gt;
+ &lt;span style=&#34;font-style: italic&#34;&gt;&lt;span style=&#34;color: #9A1900&#34;&gt;%% Receive Gun messages here...&lt;/span&gt;&lt;/span&gt;
+ {&lt;span style=&#34;color: #FF6600&#34;&gt;&#39;DOWN&#39;&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Mref&lt;/span&gt;, &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;process&lt;/span&gt;&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Reason&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt;
+ &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;error_logger:error_msg&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF0000&#34;&gt;&#34;Oops!&#34;&lt;/span&gt;),
+ &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;exit&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Reason&lt;/span&gt;);
+&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #0000FF&#34;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;What to do when you receive a &lt;code&gt;DOWN&lt;/code&gt; message is entirely up to you.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_closing_the_connection_abruptly&#34;&gt;Closing the connection abruptly&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The connection can be stopped abruptly at any time by calling
+the &lt;code&gt;gun:close/1&lt;/code&gt; function.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Immediate closing of the connection&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:close&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The process is stopped immediately without having a chance to
+perform the protocol&amp;#8217;s closing handshake, if any.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_closing_the_connection_gracefully&#34;&gt;Closing the connection gracefully&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The connection can also be stopped gracefully by calling the
+&lt;code&gt;gun:shutdown/1&lt;/code&gt; function.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;title&#34;&gt;Graceful shutdown of the connection&lt;/div&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;gun:shutdown&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;ConnPid&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Gun will refuse any new requests or messages after you call
+this function. It will however continue to send you messages
+for existing streams until they are all completed.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;For example if you performed a GET request just before calling
+&lt;code&gt;gun:shutdown/1&lt;/code&gt;, you will still receive the response before
+Gun closes the connection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you set a monitor beforehand, you will receive a message
+when the connection has been closed.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Constraints</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/constraints/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy provides an optional constraints based validation feature
+when interacting with user input.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Constraints are first used during routing. The router uses
+constraints to more accurately match bound values, allowing
+to create routes where a segment is an integer for example,
+and rejecting the others.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Constraints are also used when performing a match operation
+on input data, like the query string or cookies. There, a
+default value can also be provided for optional values.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Finally, constraints can be used to not only validate input,
+but also convert said input into proper Erlang terms, all in
+one step.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_structure&#34;&gt;Structure&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Constraints are provided as a list of fields and for each
+field a list of constraints for that field can be provided.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Fields are either the name of the field; the name and
+one or more constraints; or the name, one or more constraints
+and a default value.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When no default value is provided then the field is required.
+Otherwise the default value is used.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;All constraints for a field will be used to match its value
+in the order they are given. If the value is modified by a
+constraint, the next constraint receives the updated value.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_built_in_constraints&#34;&gt;Built-in constraints&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;tableblock&#34;&gt;
+&lt;table rules=&#34;all&#34;
+width=&#34;100%&#34;
+frame=&#34;border&#34;
+cellspacing=&#34;0&#34; cellpadding=&#34;4&#34;&gt;
+&lt;col width=&#34;50%&#34; /&gt;
+&lt;col width=&#34;50%&#34; /&gt;
+&lt;thead&gt;
+&lt;tr&gt;
+&lt;th align=&#34;left&#34; valign=&#34;top&#34;&gt; Constraint &lt;/th&gt;
+&lt;th align=&#34;left&#34; valign=&#34;top&#34;&gt; Description&lt;/th&gt;
+&lt;/tr&gt;
+&lt;/thead&gt;
+&lt;tbody&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;int&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Convert binary value to integer.&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;nonempty&lt;/p&gt;&lt;/td&gt;
+&lt;td align=&#34;left&#34; valign=&#34;top&#34;&gt;&lt;p class=&#34;table&#34;&gt;Ensures the binary value is non-empty.&lt;/p&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/tbody&gt;
+&lt;/table&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_custom_constraint&#34;&gt;Custom constraint&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In addition to the predefined constraints, Cowboy will accept
+a fun. This fun must accept one argument and return one of
+&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;{true, NewValue}&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;. The result indicates
+whether the value matches the constraint, and if it does it
+can optionally be modified. This allows converting the value
+to a more appropriate Erlang term.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that constraint functions SHOULD be pure and MUST NOT crash.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Continuous integration</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/ci/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/ci/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Placeholder chapter.&lt;/p&gt;&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Contributing</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/contributing/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/contributing/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You are welcome and encouraged to contribute.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This is how.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_priorities&#34;&gt;Priorities&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;From the most important to the least important:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+Bugs
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+Package issues/additions
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+Refactoring
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+Features
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_bugs&#34;&gt;Bugs&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have found a bug, you should open a ticket. Include
+everything relevant including the command you used, output,
+a link to the code that triggers the issue, why you think
+this is a bug, etc.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you think you have found a bug but you are not sure, you
+should open a ticket as previously explained.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have found a bug and you need it to be solved RIGHT
+NOW, open a ticket as previously explained.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Once you have opened a ticket, be patient, try to answer
+questions in a timely manner and confirm that the bug was
+indeed fixed when it is.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you can&amp;#8217;t be patient, either try to solve the bug and
+contribute the fix back or become a paying customer.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_code&#34;&gt;Code&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The code is located in the &lt;em&gt;core/*.mk&lt;/em&gt; and &lt;em&gt;plugins/*.mk&lt;/em&gt; files.
+The tests are located in the &lt;em&gt;test/Makefile&lt;/em&gt; and &lt;em&gt;test/*.mk&lt;/em&gt; files.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have a fix or a hack for a bug, you should open a
+pull request. Any fix should include a test case that fails
+before the fix and is working after.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have a test case that reproduces a bug, but no fix for
+it, you should open a pull request.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Changes need to be tested with at least the &lt;code&gt;make check&lt;/code&gt;
+command. A specific test case can be tested using &lt;code&gt;make check c=CASE&lt;/code&gt;
+with &lt;code&gt;CASE&lt;/code&gt; the name of the target to run. Output can be
+modulated using the &lt;code&gt;V&lt;/code&gt; variable, which is an integer
+from 0 to 4. A typical use would be &lt;code&gt;make check c=dialyzer V=3&lt;/code&gt;.
+The value 4 is particular and shows expanded commands right
+before they are executed.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To run tests in parallel, use the &lt;code&gt;-j&lt;/code&gt; option. It is generally
+a good idea to also use the &lt;code&gt;-k&lt;/code&gt; option to run all tests even
+if one fails. For example: &lt;code&gt;make check -j 32 -k&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Some changes should be tested against all packages. Continue
+reading for more details on testing them.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_packages&#34;&gt;Packages&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can search existing packages using the &lt;code&gt;make search q=STRING&lt;/code&gt;
+command. This can be done both from an Erlang.mk project or
+directly from the Erlang.mk repository.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Packages can be added to the index using the &lt;code&gt;pkg_add.sh&lt;/code&gt; script.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ git clone https&lt;span style=&#34;color: #990000&#34;&gt;:&lt;/span&gt;//github&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;com&lt;span style=&#34;color: #990000&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color: #009900&#34;&gt;$YOURUSERNAME&lt;/span&gt;/erlang&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;mk
+$ cd erlang&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;mk
+$ &lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;/pkg_add&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;sh cowboy git https&lt;span style=&#34;color: #990000&#34;&gt;:&lt;/span&gt;//github&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;com/ninenines/cowboy &lt;span style=&#34;color: #993399&#34;&gt;1.0&lt;/span&gt;&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color: #993399&#34;&gt;0&lt;/span&gt;
+ http&lt;span style=&#34;color: #990000&#34;&gt;:&lt;/span&gt;//ninenines&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;eu &lt;span style=&#34;color: #FF0000&#34;&gt;&#34;Small, fast and modular HTTP server.&#34;&lt;/span&gt;
+$ git push origin master&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Before sending a pull request, you should test your package.
+You can use the following command: &lt;code&gt;make check p=PACKAGE&lt;/code&gt;,
+where &lt;code&gt;PACKAGE&lt;/code&gt; is the name of the package, for example
+&lt;code&gt;cowboy&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To test all packages, the &lt;code&gt;make packages&lt;/code&gt; command can be used.
+This can take a long time. Some packages will fail with certain
+versions of Erlang, or if a prerequisite is missing from your system.
+You can of course speed things up using the &lt;code&gt;-j&lt;/code&gt; and &lt;code&gt;-k&lt;/code&gt; flags.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;After all packages have been tested, you can run the command
+&lt;code&gt;make summary&lt;/code&gt; to know what changed since the previous run.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_documentation&#34;&gt;Documentation&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The documentation is always right.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you think you have found a mistake in the documentation,
+this is a bug. You can either open a ticket or send a pull
+request.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To make sure that the documentation changes work, install
+the listed &lt;a href=&#34;../asciidoc&#34;&gt;Requirements&lt;/a&gt; on your system and
+run &lt;code&gt;make docs&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_feature_requests&#34;&gt;Feature requests&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have an awesome idea or need something that Erlang.mk
+doesn&amp;#8217;t provide yet, open a ticket. Provide as much detail as
+possible.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you have code, great! Open a pull request as previously
+explained.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If not, you can still improve your feature request by writing
+the related documentation.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Cowboy Function Reference</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/manual/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/manual/</guid>
+ <description>&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_app&#34;&gt;cowboy(7)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy&#34;&gt;cowboy(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_handler&#34;&gt;cowboy_handler(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_loop&#34;&gt;cowboy_loop(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_middleware&#34;&gt;cowboy_middleware(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_protocol&#34;&gt;cowboy_protocol(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req&#34;&gt;cowboy_req(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_rest&#34;&gt;cowboy_rest(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_router&#34;&gt;cowboy_router(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_static&#34;&gt;cowboy_static(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_sub_protocol&#34;&gt;cowboy_sub_protocol(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_websocket&#34;&gt;cowboy_websocket(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;http_status_codes&#34;&gt;HTTP status codes(7)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Cowboy User Guide</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/</guid>
+ <description>&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_rationale&#34;&gt;Rationale&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;modern_web/&#34;&gt;The modern Web&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;erlang_web/&#34;&gt;Erlang and the Web&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_introduction&#34;&gt;Introduction&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;introduction/&#34;&gt;Introduction&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;getting_started/&#34;&gt;Getting started&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;overview/&#34;&gt;Request overview&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;erlang_beginners/&#34;&gt;Erlang for beginners&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_configuration&#34;&gt;Configuration&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;routing/&#34;&gt;routing&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;constraints/&#34;&gt;Constraints&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;static_files/&#34;&gt;Static files&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_request_and_response&#34;&gt;Request and response&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;handlers/&#34;&gt;Handlers&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;loop_handlers/&#34;&gt;Loop handlers&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;req/&#34;&gt;The Req object&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;req_body/&#34;&gt;Reading the request body&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;resp/&#34;&gt;Sending a response&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cookies/&#34;&gt;Using cookies&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;multipart/&#34;&gt;Multipart&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_rest&#34;&gt;REST&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;rest_principles/&#34;&gt;REST principles&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;rest_handlers/&#34;&gt;Handling REST requests&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;rest_flowcharts/&#34;&gt;REST flowcharts&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;resource_design/&#34;&gt;Designing a resource handler&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_websocket&#34;&gt;Websocket&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;ws_protocol/&#34;&gt;The Websocket protocol&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;ws_handlers/&#34;&gt;Handling Websocket connections&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_internals&#34;&gt;Internals&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;ulist&#34;&gt;&lt;ul&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;architecture/&#34;&gt;Architecture&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;broken_clients/&#34;&gt;Dealing with broken clients&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;middlewares/&#34;&gt;Middlewares&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;sub_protocols/&#34;&gt;Sub protocols&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;hooks/&#34;&gt;Hooks&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;/ul&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Dealing with broken clients</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/broken_clients/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;That means clients that ignore the HTTP standard completely
+may fail to understand Cowboy&amp;#8217;s responses. There are of
+course workarounds. This chapter aims to cover them.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_lowercase_headers&#34;&gt;Lowercase headers&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy converts all headers it receives to lowercase, and
+similarly sends back headers all in lowercase. Some broken
+HTTP clients have issues with that.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A simple way to solve this is to create an &lt;code&gt;onresponse&lt;/code&gt; hook
+that will format the header names with the expected case.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;capitalize_hook&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Status&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Headers&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Body&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Req&lt;/span&gt;) &lt;span style=&#34;color: #990000&#34;&gt;-&amp;gt;&lt;/span&gt;
+ &lt;span style=&#34;color: #009900&#34;&gt;Headers2&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; [{&lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_bstr:capitalize_token&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;N&lt;/span&gt;), &lt;span style=&#34;color: #009900&#34;&gt;V&lt;/span&gt;}
+ || {&lt;span style=&#34;color: #009900&#34;&gt;N&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;V&lt;/span&gt;} &lt;span style=&#34;color: #990000&#34;&gt;&amp;lt;-&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Headers&lt;/span&gt;],
+ &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_req:reply&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #009900&#34;&gt;Status&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Headers2&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Body&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Req&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that HTTP/2 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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_camel_case_headers&#34;&gt;Camel-case headers&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;cowboy_protocol&lt;/code&gt; file
+directly.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_chunked_transfer_encoding&#34;&gt;Chunked transfer-encoding&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;A simple workaround exists in these cases. By changing the
+Req object response state to &lt;code&gt;waiting_stream&lt;/code&gt;, Cowboy will
+understand that it must use the identity transfer-encoding
+when replying, just like if it was an HTTP/1.0 client.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;&lt;span style=&#34;color: #009900&#34;&gt;Req2&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_req:set&lt;/span&gt;&lt;/span&gt;(&lt;span style=&#34;color: #FF6600&#34;&gt;resp_state&lt;/span&gt;, &lt;span style=&#34;color: #FF6600&#34;&gt;waiting_stream&lt;/span&gt;)&lt;span style=&#34;color: #990000&#34;&gt;.&lt;/span&gt;&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Designing a resource handler</title>
+ <link>http://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/cowboy/2.0/guide/resource_design/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_the_service&#34;&gt;The service&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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
+&lt;code&gt;service_available&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;known_methods&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_type_of_resource_handler&#34;&gt;Type of resource handler&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Am I writing a handler for a collection of resources,
+or for a single resource?&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The semantics for each of these are quite different.
+You should not mix collection and single resource in
+the same handler.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_collection_handler&#34;&gt;Collection handler&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Skip this section if you are not doing a collection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Is the collection hardcoded or dynamic? For example,
+if you use the route &lt;code&gt;/users&lt;/code&gt; for the collection of
+users then the collection is hardcoded; if you use
+&lt;code&gt;/forums/:category&lt;/code&gt; for the collection of threads
+then it isn&amp;#8217;t. When the collection is hardcoded you
+can safely assume the resource always exists.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;What methods should I implement?&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HEAD and GET are used to retrieve the collection.
+If you allow GET, also allow HEAD as there&amp;#8217;s no extra
+work required to make it work.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The next methods are more rarely allowed.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;PUT is used to create a new collection (when
+the collection isn&amp;#8217;t hardcoded), or replace
+the entire collection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;DELETE is used to delete the entire collection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_single_resource_handler&#34;&gt;Single resource handler&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Skip this section if you are doing a collection.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;What methods should I implement?&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;HEAD and GET are used to retrieve the resource.
+If you allow GET, also allow HEAD as there&amp;#8217;s no extra
+work required to make it work.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;POST is used to update the resource.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;PUT is used to create a new resource (when it doesn&amp;#8217;t
+already exist) or replace the resource.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;DELETE is used to delete the resource.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_the_resource&#34;&gt;The resource&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Following the above discussion, implement the
+&lt;code&gt;allowed_methods&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Does the resource always exist? If it may not, implement
+the &lt;code&gt;resource_exists&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;is_authorized&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Do I need fine-grained access control? How do I determine
+that they are authorized access? Handle that in your
+&lt;code&gt;is_authorized&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Can access to a resource be forbidden regardless of access
+being authorized? A simple example of that is censorship
+of a resource. Implement the &lt;code&gt;forbidden&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Are 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 &lt;code&gt;uri_too_long&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_representations&#34;&gt;Representations&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;What media types do I provide? If text based, what charsets
+are provided? What languages do I provide?&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Implement the mandatory &lt;code&gt;content_types_provided&lt;/code&gt;. Prefix
+the callbacks with &lt;code&gt;to_&lt;/code&gt; for clarity. For example, &lt;code&gt;to_html&lt;/code&gt;
+or &lt;code&gt;to_text&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Implement the &lt;code&gt;languages_provided&lt;/code&gt; or &lt;code&gt;charsets_provided&lt;/code&gt;
+callbacks if applicable.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Is there any other header that may make the representation
+of the resource vary? Implement the &lt;code&gt;variances&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Depending on your choices for caching content, you may
+want to implement one or more of the &lt;code&gt;generate_etag&lt;/code&gt;,
+&lt;code&gt;last_modified&lt;/code&gt; and &lt;code&gt;expires&lt;/code&gt; callbacks.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;multiple_choices&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_redirections&#34;&gt;Redirections&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;previously_existed&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Was the resource moved, and is the move temporary? If
+it is explicitly temporary, for example due to maintenance,
+implement the &lt;code&gt;moved_temporarily&lt;/code&gt; callback. Otherwise,
+implement the &lt;code&gt;moved_permanently&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_the_request&#34;&gt;The request&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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 &lt;code&gt;malformed_request&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;May there be a request body? Will I know its size?
+What&amp;#8217;s the maximum size of the request body I&amp;#8217;m willing
+to accept? Implement &lt;code&gt;valid_entity_length&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Finally, take a look at the sections corresponding to the
+methods you are implementing.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_options_method&#34;&gt;OPTIONS method&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Cowboy by default will send back a list of allowed methods.
+Do I need to add more information to the response? Implement
+the &lt;code&gt;options&lt;/code&gt; method.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_get_and_head_methods&#34;&gt;GET and HEAD methods&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you implement the methods GET and/or HEAD, you must
+implement one &lt;code&gt;ProvideResource&lt;/code&gt; callback for each
+content-type returned by the &lt;code&gt;content_types_provided&lt;/code&gt;
+callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_put_post_and_patch_methods&#34;&gt;PUT, POST and PATCH methods&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you implement the methods PUT, POST and/or PATCH,
+you must implement the &lt;code&gt;content_types_accepted&lt;/code&gt; callback,
+and one &lt;code&gt;AcceptResource&lt;/code&gt; callback for each content-type
+it returns. Prefix the &lt;code&gt;AcceptResource&lt;/code&gt; callback names
+with &lt;code&gt;from_&lt;/code&gt; for clarity. For example, &lt;code&gt;from_html&lt;/code&gt; or
+&lt;code&gt;from_json&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Do we want to allow the POST method to create individual
+resources directly through their URI (like PUT)? Implement
+the &lt;code&gt;allow_missing_post&lt;/code&gt; callback. It is recommended to
+explicitly use PUT in these cases instead.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;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
+&lt;code&gt;is_conflict&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_delete_methods&#34;&gt;DELETE methods&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;If you implement the method DELETE, you must implement
+the &lt;code&gt;delete_resource&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;When &lt;code&gt;delete_resource&lt;/code&gt; 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
+&lt;code&gt;delete_completed&lt;/code&gt; callback.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ <item>
+ <title>Dialyzer</title>
+ <link>http://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>http://ninenines.eu/docs/en/erlang.mk/1/guide/dialyzer/</guid>
+ <description>&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Dialyzer is a tool that will detect discrepancies in your
+program. It does so using a technique known as success
+typing analysis which has the advantage of providing no
+false positives. Dialyzer is able to detect type errors,
+dead code and more.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk provides a wrapper around Dialyzer.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_how_it_works&#34;&gt;How it works&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Dialyzer requires a PLT file to work. The PLT file contains
+the analysis information from all applications which are not
+expected to change, or rarely do. These would be all the
+dependencies of the application or applications you are
+currently working on, including standard applications in
+Erlang/OTP itself.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Dialyzer can generate this PLT file. Erlang.mk includes rules
+to automatically generate the PLT file when it is missing.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Once the PLT file is generated, Dialyzer can perform the
+analysis in record time.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_configuration&#34;&gt;Configuration&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;In a typical usage scenario, no variable needs to be set.
+The defaults should be enough. Do note however that the
+dependencies need to be set properly using the &lt;code&gt;DEPS&lt;/code&gt; and
+&lt;code&gt;LOCAL_DEPS&lt;/code&gt; variables.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;DIALYZER_PLT&lt;/code&gt; file indicates where the PLT file will
+be written to (and read from). By default this is
+&lt;em&gt;$(PROJECT).plt&lt;/em&gt; in the project&amp;#8217;s directory. Note that
+the &lt;code&gt;DIALYZER_PLT&lt;/code&gt; variable is exported and is understood
+by Dialyzer directly.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The &lt;code&gt;PLT_APPS&lt;/code&gt; variable can be used to add additional
+applications to the PLT. You can either list application
+names or paths to these applications.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Erlang.mk defines two variables for specifying options
+for the analysis: &lt;code&gt;DIALYZER_DIRS&lt;/code&gt; and &lt;code&gt;DIALYZER_OPTS&lt;/code&gt;.
+The former one defines which directories should be part
+of the analysis. The latter defines what extra warnings
+Dialyzer should report.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Note that Erlang.mk enables the race condition warnings
+by default. As it can take considerably large resources
+to run, you may want to disable it on larger projects.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+&lt;div class=&#34;sect1&#34;&gt;
+&lt;h2 id=&#34;_usage&#34;&gt;Usage&lt;/h2&gt;
+&lt;div class=&#34;sectionbody&#34;&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;To perform an analysis, run the following command:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make dialyze&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This will create the PLT file if it doesn&amp;#8217;t exist.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The analysis will also be performed when you run the
+following command, alongside tests:&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;listingblock&#34;&gt;
+&lt;div class=&#34;content&#34;&gt;&lt;!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite --&gt;
+&lt;pre&gt;&lt;tt&gt;$ make check&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;You can use the &lt;code&gt;plt&lt;/code&gt; target to create the PLT file if
+it doesn&amp;#8217;t exist. This is normally not necessary as
+Dialyzer creates it automatically.&lt;/p&gt;&lt;/div&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The PLT file will be removed when you run &lt;code&gt;make distclean&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
+&lt;/div&gt;
+&lt;/div&gt;
+</description>
+ </item>
+
+ </channel>
+</rss> \ No newline at end of file