Skip to content
instance method

Net::HTTPGenericRequest#pretty_print

(::PP q) -> untyped
pretty_print(q)

Returns a string representation of the request with the details for pp:

require 'pp'
post = Net::HTTP::Post.new(uri)
post.inspect # => "#<Net::HTTP::Post POST>"
post.pretty_inspect
# => #<Net::HTTP::Post
      POST
      path="/"
      headers={"accept-encoding" => ["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
       "accept" => ["*/*"],
       "user-agent" => ["Ruby"],
       "host" => ["www.ruby-lang.org"]}>