Sha256: ef3b8c9fbaf18b43e568d04ba26f15729c12bbeea69d30f972279ade7954bbb0

Contents?: true

Size: 500 Bytes

Versions: 7

Compression:

Stored size: 500 Bytes

Contents

class Kirk::Client
  class Response
    attr_accessor :version, :status, :body, :headers, :exception

    def initialize(buffer_body)
      @status       = nil
      @version      = nil
      @headers      = {}
      @buffer_body  = buffer_body
      @body         = buffer_body ? "" : nil
      @exception    = nil
    end

    def buffer_body?
      @buffer_body
    end

    def success?
      @status && @status < 400 && !@exception
    end

    def exception?
      @exception
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kirk-0.2.0.beta.7-java lib/kirk/client/response.rb
kirk-0.2.0.beta.6-java lib/kirk/client/response.rb
kirk-0.2.0.beta.5-java lib/kirk/client/response.rb
kirk-0.2.0.beta.4-java lib/kirk/client/response.rb
kirk-0.2.0.beta.3-java lib/kirk/client/response.rb
kirk-0.2.0.beta.2-java lib/kirk/client/response.rb
kirk-0.2.0.beta.1-java lib/kirk/client/response.rb