Class: PoliPage::RequestEvent
- Inherits:
-
Data
- Object
- Data
- PoliPage::RequestEvent
- Defined in:
- lib/poli_page/request_event.rb
Overview
Event payload for the ‘on_request` constructor hook. Fired immediately before each HTTP attempt — including the first one and every retry. Parity with sdk-node `RequestEvent` (src/types.ts:171-175).
-
‘method` [String] uppercase HTTP verb (“GET” / “POST” / “DELETE”).
-
‘url` [String] fully-resolved request URL (base_url + path).
-
‘attempt` [Integer] 1-based attempt counter — first send is `1`, the
first retry is `2`, etc.
Naming ‘:method` shadows `Object#method`, but the field name is fixed by Node-SDK parity (`RequestEvent.method` is the public payload shape). Callers won’t reach for ‘event.method(:foo)` on a value-typed event.
Instance Attribute Summary collapse
-
#attempt ⇒ Object
readonly
Returns the value of attribute attempt.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Attribute Details
#attempt ⇒ Object (readonly)
Returns the value of attribute attempt
16 17 18 |
# File 'lib/poli_page/request_event.rb', line 16 def attempt @attempt end |
#method ⇒ Object (readonly)
Returns the value of attribute method
16 17 18 |
# File 'lib/poli_page/request_event.rb', line 16 def method @method end |
#url ⇒ Object (readonly)
Returns the value of attribute url
16 17 18 |
# File 'lib/poli_page/request_event.rb', line 16 def url @url end |