mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Renamed all occurrences of ctx to env
This commit is contained in:
parent
5bc81e7e5b
commit
a0c909621c
3 changed files with 16 additions and 16 deletions
|
@ -1,9 +1,9 @@
|
|||
require "kemal"
|
||||
require "json"
|
||||
|
||||
# You can easily access the environment and set content_type like 'application/json'.
|
||||
# You can easily access the context and set content_type like 'application/json'.
|
||||
# Look how easy to build a JSON serving API.
|
||||
get "/" do |env|
|
||||
env.response.content_type = "application/json"
|
||||
env.set_content_type = "application/json"
|
||||
{name: "Serdar", age: 27}.to_json
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue