Sha256: 5dbbcd8367bdfbb3311dfe1d3f9408104f630d6438144090f391e849f5eb0f7d

Contents?: true

Size: 719 Bytes

Versions: 10

Compression:

Stored size: 719 Bytes

Contents

module Parliament
  # An error raised when a 204 status code 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.code == '204'
    def initialize(url, response)
      super
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
parliament-ruby-0.7.5.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.4 lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.3.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.2.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.1.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.7.0.pre lib/parliament/no_content_response_error.rb
parliament-ruby-0.6.3 lib/parliament/no_content_response_error.rb
parliament-ruby-0.6.2 lib/parliament/no_content_response_error.rb
parliament-ruby-0.6.1 lib/parliament/no_content_response_error.rb
parliament-ruby-0.6.0 lib/parliament/no_content_response_error.rb