mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Update rest.md
This commit is contained in:
parent
5b5a6008f7
commit
94ed386851
1 changed files with 15 additions and 15 deletions
|
@ -6,23 +6,23 @@ title: Restful Web Services
|
||||||
You can handle HTTP methods as easy as writing method names and the route with a code block. Kemal will handle all the hard work.
|
You can handle HTTP methods as easy as writing method names and the route with a code block. Kemal will handle all the hard work.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
get "/" do
|
get "/" do
|
||||||
.. show something ..
|
.. show something ..
|
||||||
end
|
end
|
||||||
|
|
||||||
post "/" do
|
post "/" do
|
||||||
.. create something ..
|
.. create something ..
|
||||||
end
|
end
|
||||||
|
|
||||||
put "/" do
|
put "/" do
|
||||||
.. replace something ..
|
.. replace something ..
|
||||||
end
|
end
|
||||||
|
|
||||||
patch "/" do
|
patch "/" do
|
||||||
.. modify something ..
|
.. modify something ..
|
||||||
end
|
end
|
||||||
|
|
||||||
delete "/" do
|
delete "/" do
|
||||||
.. annihilate something ..
|
.. annihilate something ..
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue