class

Lucky::TextResponse

Inherits Lucky::Response < Reference < Object

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

Constants

DEFAULT_STATUS = 200

Constructors

new(context : HTTP::Server::Context, content_type : String, body : String | IO, status : Int32 | Nil = nil, debug_message : String | Nil = nil, enable_cookies : Bool = true)
Source

Instance methods

body
Source
content_type
Source
context
Source
debug_message
Source
enable_cookies
Source
status
Source