Skip to content

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

instance method

Net::HTTPResponse#body_encoding=

body_encoding=(value)

Set the encoding to use for the response body. If given a String, find the related Encoding.

See also #body= #inspect #body #read_body also in 3.4 · 3.3 · 3.2