class Symphony::HttpServer

Defined in:

symphony/http/http_server.cr

Constant Summary

AccessLog = Log.for("request")
Log = Symphony::Log.for(HttpServer)

Constructors

Instance Method Summary

Instance methods inherited from class Symphony::BackgroundService

alive? : Bool alive?, interrupt : Nil interrupt, join(timeout : Time::Span | Nil = nil) : Nil join, start : Nil start

Macros inherited from class Symphony::BackgroundService

service_implemented_by(service) service_implemented_by

Constructor Detail

def self.new(host : String = "127.0.0.1", port : Int32 = 8080, health_check : HealthCheck | Nil = nil, *, reuse_port : Bool = false, &handler : HTTP::Server::Context -> ) #

[View source]

Instance Method Detail

def alive? : Bool #

[View source]
def format_access_log(ctx : HTTP::Server::Context) : String #

[View source]
def interrupt : Nil #

[View source]
def join(timeout : Time::Span | Nil = nil) : Nil #

[View source]
def max_request_to_always_log : UInt64 #

This allows to log the first requests fully, but afterwards skip them unless they seems important (defined by #skip_logging).


[View source]
def max_request_to_always_log=(max_request_to_always_log : UInt64) #

This allows to log the first requests fully, but afterwards skip them unless they seems important (defined by #skip_logging).


[View source]
def skip_logging(ctx) : Bool #

[View source]
def start : Nil #

[View source]