Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Net::HTTPHeader#range=

range=(r, e = nil)

Alias of #set_range

Sets the HTTP Range: header. Accepts either a Range object as a single argument, or a beginning index and a length from that index. Example:

Example
req.range = (0..1023)
req.set_range 0, 1023
See also #set_range #range #range_length #proxy_basic_auth also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1