Skip to content

Commit b3ee115

Browse files
committed
added a quick fix to allow https
1 parent 6b5ea85 commit b3ee115

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mockserver/abstract_client.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class AbstractClient
2626
def initialize(host, port)
2727
fail 'Cannot instantiate AbstractClient class. You must subclass it.' if self.class == AbstractClient
2828
fail 'Host/port must not be nil' unless host && port
29-
@base = RestClient::Resource.new("http://#{host}:#{port}", headers: { 'Content-Type' => 'application/json' })
29+
protocol = ('https' if port == 443) || 'http'
30+
@base = RestClient::Resource.new("#{protocol}://#{host}:#{port}", headers: { 'Content-Type' => 'application/json' })
3031
@logger = ::LoggingFactory::DEFAULT_FACTORY.log(self.class)
3132
end
3233

0 commit comments

Comments
 (0)