Created
May 23, 2017 19:00
-
-
Save danajp/c18bb8bac4b588ca0d20475479ec1145 to your computer and use it in GitHub Desktop.
[net http blog] monkey patch rest client request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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