Class: Capybara::Lightpanda::Headers

Inherits:
Hash
  • Object
show all
Defined in:
lib/capybara/lightpanda/headers.rb

Overview

Hash subclass that downcases the lookup key. CDP returns response headers with lowercased names (“content-type”), but Capybara callers reach for the canonical casing (“Content-Type”). Mirrors capybara-playwright-driver’s Headers class (lib/capybara/playwright/page.rb).

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



10
11
12
# File 'lib/capybara/lightpanda/headers.rb', line 10

def [](key)
  super(key.to_s.downcase)
end