You can use the net/http
standard library to make a HTTP request with a custom method in Ruby. Here's an example:
main.rb516 chars20 lines
In this example, we create a new Net::HTTP::Patch
object to make a PATCH request to the http://example.com/api/resource
URI. We then add headers and data to the request, and send it using Net::HTTP.start
. Finally, we print the response body.
gistlibby LogSnag