ey_stonith 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ey_stonith/awsm_notifier.rb +4 -1
- metadata +2 -2
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'net/http'
|
3
|
+
require 'net/https'
|
3
4
|
require 'timeout'
|
4
5
|
|
5
6
|
module EY
|
@@ -32,7 +33,9 @@ module EY
|
|
32
33
|
|
33
34
|
def do_request
|
34
35
|
response = Timeout.timeout(10) do
|
35
|
-
Net::HTTP.new(@uri.host, @uri.port)
|
36
|
+
http = Net::HTTP.new(@uri.host, @uri.port)
|
37
|
+
http.use_ssl = true if @uri.scheme == "https"
|
38
|
+
http.request_post(@uri.path, process_payload(payload), headers)
|
36
39
|
end
|
37
40
|
[response.code.to_i, response.body]
|
38
41
|
end
|