Class: Puppet::Network::HTTP::Response

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

Instance Method Summary collapse

Constructor Details

#initialize(handler, response) ⇒ Response

Returns a new instance of Response.



2
3
4
5
# File 'lib/puppet/network/http/response.rb', line 2

def initialize(handler, response)
  @handler = handler
  @response = response
end

Instance Method Details

#respond_with(code, type, body) ⇒ Object



7
8
9
10
# File 'lib/puppet/network/http/response.rb', line 7

def respond_with(code, type, body)
  @handler.set_content_type(@response, type)
  @handler.set_response(@response, body, code)
end