summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorotegami <otegami@clear-code.com>2024-08-27 13:45:57 +0900
committergit <svn-admin@ruby-lang.org>2024-09-08 14:12:59 +0000
commit6ea2b6f65f92c4b8cfd91a655dcd89a7082bf6e4 (patch)
tree10b26218c49e948dfbdfe6ba7e666fe099ca99f0 /test/ruby
parentec5d5422ca7220975a4eded9a39a9f2a30d9e758 (diff)
[ruby/open-uri] Add `request_specific_fields` option for customizing headers
This commit introduces the `request_specific_fields` option in OpenURI. It provides two methods for customizing headers as follows. 1. Specify headers only for the initial request Use a Hash to apply headers only to the first request. These headers are automatically removed during redirects. 2. Specify headers dynamically for each request Use a Proc to dynamically generate headers for each request, including during redirects, based on the request URL. This feature allows users to control headers flexibly, ensuring that sensitive headers like "Authorization" are not unintentionally transferred during redirects unless explicitly specified. https://github.com/ruby/open-uri/commit/460f858e3c
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions