File tree Expand file tree Collapse file tree 3 files changed +18
-29
lines changed Expand file tree Collapse file tree 3 files changed +18
-29
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33module HelloWorld
44 class Routes < Hanami ::Routes
5- get "/json" , to : "json.index"
5+ get "/json" , to : -> ( env ) do
6+ [ 200 ,
7+ {
8+ 'Server' => 'Rails' ,
9+ 'Content-Type' => 'application/json' ,
10+ 'Date' => Time . now . httpdate ,
11+ } ,
12+ [ { 'message' => 'Hello, World!' } . to_json ] ]
13+ end
614 get "/db" , to : "db.index"
715 get "/queries" , to : "queries.index"
816 get "/fortunes" , to : "fortunes.index"
917 get "/updates" , to : "updates.index"
10- get "/plaintext" , to : "plaintext.index"
18+ get "/plaintext" , to : -> ( env ) do
19+ [ 200 ,
20+ {
21+ 'Server' => 'Hanami' ,
22+ 'Content-Type' => 'text/plain' ,
23+ 'Date' => Time . now . httpdate
24+ } ,
25+ [ 'Hello, World!' ] ]
26+ end
1127 end
1228end
You can’t perform that action at this time.
0 commit comments