Class: ProconBypassMan::ReportHttpClient
- Inherits:
-
HttpClient
- Object
- HttpClient
- ProconBypassMan::ReportHttpClient
- Defined in:
- lib/procon_bypass_man/support/report_http_client.rb
Instance Method Summary collapse
Methods inherited from HttpClient
Constructor Details
This class inherits a constructor from ProconBypassMan::HttpClient
Instance Method Details
#post(body:, event_type:) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/procon_bypass_man/support/report_http_client.rb', line 3 def post(body: , event_type: ) if body.is_a?(Hash) b = body else b = { text: body } end super(request_body: { session_id: ProconBypassMan.session_id, device_id: ProconBypassMan.device_id, hostname: `hostname`.chomp, event_type: event_type, body: b, }) end |