class Parliament::NoContentResponseError
An error raised when an empty response is returned by Net::HTTP inside of Parliament::Request
.
@since 0.6.0
Public Class Methods
new(url, response)
click to toggle source
@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?
Calls superclass method
Parliament::NetworkError::new
# File lib/parliament/no_content_response_error.rb, line 15 def initialize(url, response) super end