To make a HTTP TRACE request in Ruby, you can use the Net::HTTP
standard library. Here's an example:
main.rb168 chars9 lines
In this example, we first create a URI
object representing the desired URL. We then start a new Net::HTTP
session and use the trace
method to issue a HTTP TRACE request to the server at the specified URI. The response object contains the HTTP response status code and headers, as well as the response body, which we print to the console in this example.
gistlibby LogSnag