Skip to content

Instantly share code, notes, and snippets.

View moiristo's full-sized avatar
💭
Monkey see monkey do

Reinier de Lange moiristo

💭
Monkey see monkey do
View GitHub Profile
@moiristo
moiristo / net_http_debug.rb
Last active November 29, 2023 16:27 — forked from brainlid/net_http_debug.rb
Enable debug for all Ruby HTTP requests
require 'net/http'
module Net
class HTTP
def self.enable_debug!
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
instance.set_debug_output($stderr)
instance