class Global
- Global
- Reference
- Object
Overview
Extend Global class with session storage.
This allows the session to be shared between with_session and
the HTTP helper methods (get, post, etc.)
Defined in:
spec-kemal.crspec-kemal/session.cr
Class Method Summary
-
.response
Returns the response from the last request
-
.response=(response : Nil | HTTP::Client::Response)
Sets the response from the last request
-
.session=(session : Kemal::Session | Nil)
The current test session, if any.
-
.session? : Kemal::Session | Nil
The current test session, if any.
Class Method Detail
def self.response=(response : Nil | HTTP::Client::Response)
#
Sets the response from the last request
def self.session=(session : Kemal::Session | Nil)
#
The current test session, if any. When set, all HTTP requests will include this session's cookie.
def self.session? : Kemal::Session | Nil
#
The current test session, if any. When set, all HTTP requests will include this session's cookie.