class Hatty::Request
- Hatty::Request
- Reference
- Object
Defined in:
hatty/request.crConstructors
Instance Method Summary
- #body(mappings)
- #body : JSON::Any?
- #cookies : HTTP::Cookies
- #files : Hash(String, Tempfile)?
- #form : Hash(String, String)?
- #method
-
#original : HTTP::Request
Returns the original request
-
#parameters : Hash(String, String)
Alias for
#params
-
#params : Hash(String, String)
Returns a hash with the url parameters.
- #path
- #query : Hash(String, String)
-
#url
Alias for
#path
Constructor Detail
Instance Method Detail
def params : Hash(String, String)
#
Returns a hash with the url parameters.
get "/users/:id" do |request, response|
puts response.params["id"]
end
# GET /users/3
# > "3"