class Lucky::TextResponse
Overview
Writes the content_type, status, and body to the context for text responses.
There are two settings in Lucky::Server.settings
that determine if
the text response is gzip encoded; Lucky::Server.settings.gzip_enabled
and Lucky::Server.settings.gzip_content_types
.
These settings can be adjusted in your Lucky app under config/server.cr
Defined in:
lucky/text_response.crConstant Summary
-
DEFAULT_STATUS =
200
Constructors
Instance Method Summary
- #body : IO | String
- #content_type : String
- #context : HTTP::Server::Context
- #debug_message : String | Nil
- #enable_cookies : Bool
- #print : Nil
- #status : Int
Instance methods inherited from class Lucky::Response
debug_message : String | Nil
debug_message,
print
print,
status : Int
status
Instance methods inherited from class Object
blank? : Bool
blank?,
present? : Bool
present?
Constructor Detail
def self.new(context : HTTP::Server::Context, content_type : String, body : String | IO, status : Int32 | Nil = nil, debug_message : String | Nil = nil, enable_cookies : Bool = true)
#