Skip to content

Instantly share code, notes, and snippets.

@danajp
Created May 23, 2017 19:00
Show Gist options
  • Save danajp/c18bb8bac4b588ca0d20475479ec1145 to your computer and use it in GitHub Desktop.
Save danajp/c18bb8bac4b588ca0d20475479ec1145 to your computer and use it in GitHub Desktop.
[net http blog] monkey patch rest client request
module MonkeyPatches
module RestClientRequest
def net_http_object(hostname, port)
net = super(hostname, port)
extra_chain_cert = @ssl_opts[:extra_chain_cert]
net.extra_chain_cert = extra_chain_cert if extra_chain_cert
net
end
end
end
RestClient::Request.send(:prepend, MonkeyPatches::RestClientRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment