class Crack::Handler::Params

Overview

The Params handler will parse parameters from a URL, a form post or a JSON post and provide them in the context params hash. This unifies access to parameters into one place to simplify access to them. Note: other params from the router will be handled in the router handler instead of here. This removes a dependency on the router in case it is replaced or not needed.

Defined in:

crack/params.cr

Constant Summary

APPLICATION_JSON = "application/json"
MULTIPART_FORM = "multipart/form-data"
URL_ENCODED_FORM = "application/x-www-form-urlencoded"

Class Method Summary

Instance Method Summary

Instance methods inherited from class Crack::Handler::Base

call(context) call, config(&) config

Class methods inherited from class Crack::Handler::Base

config(&) config

Class Method Detail

def self.instance #

class method to return a singleton instance of this Controller


[View source]

Instance Method Detail

def call(context) #
Description copied from class Crack::Handler::Base

Execution of this handler.


[View source]
def parse(context) #

[View source]
def parse_body(context) #

[View source]
def parse_json(context) #

[View source]
def parse_multipart(context) #

[View source]
def parse_query(context) #

[View source]