class
Runcobo::RequestInput
- Runcobo::RequestInput
- Reference
- Object
Overview
One cache per request, shared by body limits and both contract entry styles.
Defined in:
runcobo/request_input.crConstructors
Instance Method Summary
-
#body(limit : Int64 = @max_body_size) : String
Rewind the request body for consumers such as multipart parsers.
- #cleanup_uploads : Nil
- #contract_input(limit : Int64 = @max_body_size)
- #form(limit : Int64 = @max_body_size) : HTTP::Params
- #json(limit : Int64 = @max_body_size, *, empty_object = false) : JSON::Any
- #max_body_size : Int64
- #max_body_size=(max_body_size : Int64)
-
#merged(limit : Int64 = @max_body_size) : HTTP::Params | JSON::Any
Request-level contracts combine query, body and route fields explicitly.
- #multipart? : Bool
- #query : HTTP::Params
- #raw_body : String | Nil
- #upload(name : String, limit : Int64 = @max_body_size) : UploadFile
- #uploads(name : String, limit : Int64 = @max_body_size) : Array(UploadFile)
Constructor Detail
Instance Method Detail
def body(limit : Int64 = @max_body_size) : String
#
Rewind the request body for consumers such as multipart parsers. Contracts use the cached string rather than reading the replacement stream again.
def merged(limit : Int64 = @max_body_size) : HTTP::Params | JSON::Any
#
Request-level contracts combine query, body and route fields explicitly. Structured body fields replace query fields; route fields always win. Ordinary form values append, preserving duplicate-scalar validation.