@@ -33,7 +33,7 @@ Note: The `hooks` gem name is already taken on RubyGems, so this project is name
33332 . ** Plugin Architecture**
3434
3535 * ** Team Handlers** : ` class MyHandler < Hooks::Plugins::Handlers::Base `
36- * Must implement ` #call(payload:, headers:, config:) ` method
36+ * Must implement ` #call(payload:, headers:, env:, config:) ` method
3737 * ` payload ` : parsed request body (JSON Hash or raw String)
3838 * ` headers ` : HTTP headers as Hash with string keys
3939 * ` config ` : merged endpoint configuration including ` opts ` section
@@ -230,7 +230,7 @@ endpoints_dir: ./config/endpoints # directory containing endpoint configs
230230 * **Before**: enforce `request_limit`, `request_timeout`
231231 * **Signature**: call custom or default validator
232232 * **Hooks**: run `on_request` plugins
233- * **Handler**: invoke `MyHandler.new.call(payload:, headers:, config:)`
233+ * **Handler**: invoke `MyHandler.new.call(payload:, headers:, env:, config:)`
234234 * **After**: run `on_response` plugins
235235 * **Rescue**: on exception, run `on_error`, rethrow or format JSON error
236236
@@ -528,9 +528,10 @@ Base class for all webhook handlers.
528528class MyHandler < Hooks::Plugins::Handlers::Base
529529 # @param payload [Hash, String] Parsed request body or raw string
530530 # @param headers [Hash<String, String>] HTTP headers
531+ # @param env [Hash] Rack environment (includes request context)
531532 # @param config [Hash] Merged endpoint configuration
532533 # @return [Hash, String, nil] Response body (auto-converted to JSON)
533- def call(payload:, headers:, config:)
534+ def call(payload:, headers:, env:, config:)
534535 # Handler implementation
535536 { status: "processed", id: generate_id }
536537 end
0 commit comments