From 31cabe0fb98b4c75cb088761ba5ad53dbd2285ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 14 Sep 2016 18:51:11 +0200 Subject: Use spaces in snippets in the guide --- doc/src/guide/resp.asciidoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/src/guide/resp.asciidoc') diff --git a/doc/src/guide/resp.asciidoc b/doc/src/guide/resp.asciidoc index b8ba7d5..1f6b318 100644 --- a/doc/src/guide/resp.asciidoc +++ b/doc/src/guide/resp.asciidoc @@ -71,7 +71,7 @@ Body = <<"Hats off!">>, Req = cowboy_req:reply(200, #{ <<"content-type">> => <<"text/html">> }, ["", Title, "", - "

", Body, "

"], Req0). + "

", Body, "

"], Req0). ---- This method of building responses is more efficient than @@ -247,7 +247,7 @@ To send a file while replying: [source,erlang] ---- Req = cowboy_req:reply(200, #{ - <<"content-type">> => "image/png" + <<"content-type">> => "image/png" }, {sendfile, 0, 12345, "path/to/logo.png"}, Req0). ---- @@ -289,13 +289,13 @@ in the response: [source,erlang] ---- cowboy_req:push("/static/style.css", #{ - <<"accept">> => <<"text/css">> + <<"accept">> => <<"text/css">> }, Req0), Req = cowboy_req:reply(200, #{ - <<"content-type">> => <<"text/html">> + <<"content-type">> => <<"text/html">> }, ["My web page", - "", - "

Welcome to Erlang!

"], Req0). + "", + "

Welcome to Erlang!

"], Req0). ---- To override the method, scheme, host, port or query string, @@ -305,7 +305,7 @@ uses a different host name: [source,erlang] ---- cowboy_req:push("/static/style.css", #{ - <<"accept">> => <<"text/css">> + <<"accept">> => <<"text/css">> }, #{host => <<"cdn.example.org">>}, Req), ---- -- cgit v1.2.3