class Cossack::Request
- Cossack::Request
- Reference
- Object
Overview
Request built by Client, that can be processed by middleware and a connection.
request.method # => "POST"
request.uri # => #<URI:0x11b8ea0 @scheme="http", @host="example.org" ...>
request.body # => "payload"
request.headers # => #<HTTP::Headers ... >
request.options.connect_timeout # => 30
request.options.read_timeout # => 30
Defined in:
cossack/request.crConstructors
- .new(method : String, uri : URI, headers : HTTP::Headers = HTTP::Headers.new, body : String | Nil = nil, options : Cossack::RequestOptions = RequestOptions.new)
- .new(method : String, uri : String, headers : HTTP::Headers = HTTP::Headers.new, body : String | Nil = nil, options : Cossack::RequestOptions = RequestOptions.new)
Instance Method Summary
- #body : String?
- #body=(body : Nil | String)
- #headers : HTTP::Headers
- #headers=(headers : HTTP::Headers)
- #method : String
- #method=(method : String)
- #options : Cossack::RequestOptions
- #options=(options : Cossack::RequestOptions)
- #uri : URI
- #uri=(uri : URI)
Constructor Detail
def self.new(method : String, uri : URI, headers : HTTP::Headers = HTTP::Headers.new, body : String | Nil = nil, options : Cossack::RequestOptions = RequestOptions.new)
#
def self.new(method : String, uri : String, headers : HTTP::Headers = HTTP::Headers.new, body : String | Nil = nil, options : Cossack::RequestOptions = RequestOptions.new)
#