Sha256: 42b6c2b044619ecf05d843b56e8c2c3a3fefacd4436e11a99fa20ce5a479ea1a

Contents?: true

Size: 715 Bytes

Versions: 20

Compression:

Stored size: 715 Bytes

Contents

module Parliament
  # An error raised when an empty response is returned by Net::HTTP inside of Parliament::Request.
  #
  # @since 0.6.0
  class NoContentResponseError < Parliament::NetworkError
    # @param [String] url the url that caused the Parliament::ClientError
    # @param [Net::HTTPResponse] response the Net:HTTPResponse that caused the Parliament::NoContentResponseError
    #
    # @example Creating a Parliament::NoContentResponseError
    #   url = 'http://localhost:3030/foo/bar'
    #
    #   response = Net::HTTP.get_response(URI(url))
    #
    #   raise Parliament::NoContentResponseError.new(url, response) if response.body.nil?
    def initialize(url, response)
      super
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
parliament-ruby-1.0.2 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.1 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre6 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre5 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre4 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre3 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre2 lib/parliament/no_content_response_error.rb
parliament-ruby-1.0.0.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.10.2 lib/parliament/no_content_response_error.rb
parliament-ruby-0.10.1 lib/parliament/no_content_response_error.rb
parliament-ruby-0.10.0 lib/parliament/no_content_response_error.rb
parliament-ruby-0.9.0 lib/parliament/no_content_response_error.rb
parliament-ruby-0.8.0 lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.9.pre2 lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.9.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.8 lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.8.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.7 lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.6 lib/parliament/no_content_response_error.rb