Module: NginxUtils::Status
- Defined in:
- lib/nginx_utils/status.rb
Class Method Summary collapse
Class Method Details
.get(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/nginx_utils/status.rb', line 6 def get(={}) host = [:host] || "localhost" port = [:port] || 80 path = [:path] || "/nginx_status" req = Net::HTTP::Get.new(path) res = Net::HTTP.start(host, port){|http| http.request(req)} parse res end |