Sha256: f279aa66634677507c59a089115241ec56343845d02fd270a8e03d28d5e1676f

Contents?: true

Size: 512 Bytes

Versions: 5

Compression:

Stored size: 512 Bytes

Contents

module Puppet::Rest
  # This is a wrapper for the HTTP::Message class of the HTTPClient
  # gem. It is designed to wrap a message sent as an HTTP response.
  class Response
    def initialize(message)
      @message = message
    end

    def body
      @message.body
    end

    def content_type
      @message.content_type
    end

    def content_encoding
      @message.headers['Content-Encoding']
    end

    def status_code
      @message.status
    end

    def ok?
      @message.ok?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bolt-0.21.1 vendored/puppet/lib/puppet/rest/response.rb
bolt-0.21.0 vendored/puppet/lib/puppet/rest/response.rb
bolt-0.20.7 vendored/puppet/lib/puppet/rest/response.rb
bolt-0.20.6 vendored/puppet/lib/puppet/rest/response.rb
bolt-0.20.5 vendored/puppet/lib/puppet/rest/response.rb