Class: Pagerduty::HttpTransport Private
- Inherits:
-
Object
- Object
- Pagerduty::HttpTransport
- Defined in:
- lib/pagerduty/http_transport.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- HOST =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"events.pagerduty.com"- PORT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
443- PATH =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"/generic/2010-04-15/create_event.json"
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ HttpTransport
constructor
private
A new instance of HttpTransport.
- #send_payload(payload = {}) ⇒ Object private
Constructor Details
#initialize(options = {}) ⇒ HttpTransport
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of HttpTransport.
13 14 15 |
# File 'lib/pagerduty/http_transport.rb', line 13 def initialize( = {}) = end |
Instance Method Details
#send_payload(payload = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 |
# File 'lib/pagerduty/http_transport.rb', line 17 def send_payload(payload = {}) response = post payload.to_json response.error! unless transported?(response) JSON.parse(response.body) end |