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.cr

Constant Summary

DEFAULT_STATUS = 200

Constructors

Instance Method Summary

Instance methods inherited from class Lucky::Response

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) #

[View source]

Instance Method Detail

def body : IO | String #

[View source]
def content_type : String #

[View source]
def context : HTTP::Server::Context #

[View source]
def debug_message : String? #

[View source]
def enable_cookies : Bool #

[View source]
def print : Nil #

[View source]
def status : Int #

[View source]