class

Grip::Parsers::ParameterBox

Inherits Reference / Object

Constants

APPLICATION_JSON = "application/json"
EMPTY_FILE = {} of String => FileUpload
EMPTY_JSON = {} of String => AllParamTypes
EMPTY_PARAMS = HTTP::Params.new({} of String => Array(String))
EMPTY_STRING_HASH = {} of String => String

Use class-level empty instances to avoid allocations

FLAG_BODY = 4_u8
FLAG_FILE = 16_u8
FLAG_JSON = 8_u8
FLAG_QUERY = 2_u8
FLAG_URL = 1_u8
MULTIPART_FORM = "multipart/form-data"
URL_ENCODED_FORM = "application/x-www-form-urlencoded"

Constructors

new(request : HTTP::Request, url : Hash(String, String) = EMPTY_STRING_HASH)
Source

Instance methods

body
Source
file
Source
json
Source
query
Source
url

URL params - most frequently accessed, optimize heavily

Source

Nested types