fix teapot example
This commit is contained in:
parent
7730849622
commit
9f6923214f
|
@ -732,7 +732,7 @@ Vergleichbar mit +body+ lassen sich auch Status-Code und Header setzen:
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
halt "Ich bin ein Teekesselchen"
|
||||
end
|
||||
|
|
|
@ -814,7 +814,7 @@ De manera similar, también podés asignar el código de estado y encabezados:
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
body "I'm a tea pot!"
|
||||
end
|
||||
|
|
|
@ -832,7 +832,7 @@ retour et les entêtes :
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
body "Je suis une théière !"
|
||||
end
|
||||
|
|
|
@ -805,7 +805,7 @@ Similar to the body, you can also set the status code and headers:
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
body "I'm a tea pot!"
|
||||
end
|
||||
|
|
|
@ -780,7 +780,7 @@ Thin - это более производительный и функциона
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
body "I'm a tea pot!"
|
||||
end
|
||||
|
|
|
@ -897,7 +897,7 @@ Session被用来在请求之间保持状态。如果被激活,每一个用户
|
|||
get '/foo' do
|
||||
status 418
|
||||
headers \
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN"
|
||||
"Allow" => "BREW, POST, GET, PROPFIND, WHEN",
|
||||
"Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
|
||||
body "I'm a tea pot!"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue