Class: Puppet::HTTP::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/http/service.rb

Direct Known Subclasses

Ca

Defined Under Namespace

Classes: Ca

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, url) ⇒ Service


4
5
6
7
# File 'lib/puppet/http/service.rb', line 4

def initialize(client, url)
  @client = client
  @url = url
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url


2
3
4
# File 'lib/puppet/http/service.rb', line 2

def url
  @url
end

Instance Method Details

#connect(ssl_context: nil) ⇒ Object


15
16
17
# File 'lib/puppet/http/service.rb', line 15

def connect(ssl_context: nil)
  @client.connect(@url, ssl_context: ssl_context)
end

#with_base_url(path) ⇒ Object


9
10
11
12
13
# File 'lib/puppet/http/service.rb', line 9

def with_base_url(path)
  u = @url.dup
  u.path += path
  u
end