We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b5ea85 commit b3ee115Copy full SHA for b3ee115
lib/mockserver/abstract_client.rb
@@ -26,7 +26,8 @@ class AbstractClient
26
def initialize(host, port)
27
fail 'Cannot instantiate AbstractClient class. You must subclass it.' if self.class == AbstractClient
28
fail 'Host/port must not be nil' unless host && port
29
- @base = RestClient::Resource.new("http://#{host}:#{port}", headers: { 'Content-Type' => 'application/json' })
+ protocol = ('https' if port == 443) || 'http'
30
+ @base = RestClient::Resource.new("#{protocol}://#{host}:#{port}", headers: { 'Content-Type' => 'application/json' })
31
@logger = ::LoggingFactory::DEFAULT_FACTORY.log(self.class)
32
end
33
0 commit comments