Class: Bender::HTTP::Ping

Inherits:
BaseServlet
  • Object
show all
Defined in:
servlets/ping.rb

Overview

Description:

a simple ping endpoint
Dependencies

none

Configuration

none

Authors

Michael Heijmans ([email protected])

Instance Attribute Summary

Attributes inherited from BaseServlet

#auth_token, #bot, #config, #options, #server

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseServlet

#initialize, #params

Constructor Details

This class inherits a constructor from Bender::BaseServlet

Class Method Details

.mountpointObject


27
28
29
# File 'servlets/ping.rb', line 27

def self.mountpoint
  "/ping"
end

Instance Method Details

#do_GET(request, response) ⇒ Object


16
17
18
19
20
21
22
23
24
25
# File 'servlets/ping.rb', line 16

def do_GET(request, response)
  status = 200
  content_type = "text/html"
  body = "OK\n"

  response.status = status
  response['Content-Type'] = content_type
  response.body = body
  response.body = body
end