Class: Adminix::Web::Server
- Inherits:
-
EM::HttpServer::Server
- Object
- EM::HttpServer::Server
- Adminix::Web::Server
- Defined in:
- lib/adminix/web/server.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#http_request_errback(e) ⇒ Object
19 20 21 22 |
# File 'lib/adminix/web/server.rb', line 19 def http_request_errback(e) # printing the whole exception puts e.inspect end |
#not_found_route ⇒ Object
Routes
26 27 28 29 |
# File 'lib/adminix/web/server.rb', line 26 def not_found_route content = 'Page not found' render text: content, status: 404 end |
#process_http_request ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/adminix/web/server.rb', line 6 def process_http_request # puts @http_request_method # puts @http_request_uri # puts @http_query_string # puts @http_protocol # puts @http_content # puts @http[:cookie] # puts @http[:content_type] # you have all the http headers in this hash # puts @http.inspect process_request end |