lib/odata/service.rb
def validate_response(response)
      raise "Bad Request. #{error_message(response)}" if response.code == 400
      raise "Access Denied" if response.code == 401
      raise "Forbidden" if response.code == 403
      raise "Invalid URL" if [0,404].include?(response.code)
      raise "Method Not Allowed" if response.code == 405
      raise "Not Acceptable" if response.code == 406
      raise "Request Entity Too Large" if response.code == 413
      raise "Internal Server Error" if response.code == 500
      raise "Service Unavailable" if response.code == 503
    end
# The OData Service's URL
The OData Service's URL
The OData Service ' s URL
def validate_response(response)
      raise "Bad Request. #{error_message(response)}" if response.code == 400
      raise "Access Denied" if response.code == 401
      raise "Forbidden" if response.code == 403
      raise "Invalid URL" if [0,404].include?(response.code)
      raise "Method Not Allowed" if response.code == 405
      raise "Not Acceptable" if response.code == 406
      raise "Request Entity Too Large" if response.code == 413
      raise "Internal Server Error" if response.code == 500
      raise "Service Unavailable" if response.code == 503
    end
def validate_response ( response ) raise "Bad Request. #{error_message(response)}" if response . code == 400 raise "Access Denied" if response . code == 401 raise "Forbidden" if response . code == 403 raise "Invalid URL" if [ 0 , 404 ] . include? ( response . code ) raise "Method Not Allowed" if response . code == 405 raise "Not Acceptable" if response . code == 406 raise "Request Entity Too Large" if response . code == 413 raise "Internal Server Error" if response . code == 500 raise "Service Unavailable" if response . code == 503 end
The OData Service's URL
The OData Service ' s URL
response