class Hatty::Request

Defined in:

hatty/request.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(request : HTTP::Request) #

[View source]

Instance Method Detail

def body(mappings) #

[View source]
def body : JSON::Any? #

[View source]
def cookies : HTTP::Cookies #

[View source]
def files : Hash(String, Tempfile)? #

[View source]
def form : Hash(String, String)? #

[View source]
def method #

[View source]
def original : HTTP::Request #

Returns the original request


[View source]
def parameters : Hash(String, String) #

Alias for #params


[View source]
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"

[View source]
def path #

[View source]
def query : Hash(String, String) #

[View source]
def url #

Alias for #path


[View source]