Class: PoliPage::ResponseEvent
- Inherits:
-
Data
- Object
- Data
- PoliPage::ResponseEvent
- Defined in:
- lib/poli_page/response_event.rb
Overview
Event payload for the ‘on_response` constructor hook. Fired immediately after a 2xx response is received from the transport (NOT fired on non-2xx — those go through `on_retry` / `on_error` instead). Parity with sdk-node `ResponseEvent` (src/types.ts:177-181).
-
‘status` [Integer] HTTP status code (always 200-299).
-
‘request_id` [String, nil] value of the `x-request-id` response
header, or nil if the server didn't send one. -
‘duration_ms` [Integer] wall-clock duration of the HTTP attempt,
measured around `@transport.execute`.
Instance Attribute Summary collapse
-
#duration_ms ⇒ Object
readonly
Returns the value of attribute duration_ms.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Attribute Details
#duration_ms ⇒ Object (readonly)
Returns the value of attribute duration_ms
14 15 16 |
# File 'lib/poli_page/response_event.rb', line 14 def duration_ms @duration_ms end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id
14 15 16 |
# File 'lib/poli_page/response_event.rb', line 14 def request_id @request_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status
14 15 16 |
# File 'lib/poli_page/response_event.rb', line 14 def status @status end |