Sha256: 92c31d31718601bccd0dd63ff2a827ff12aa6fc03328dbecc9bb5ac991268ad2
Contents?: true
Size: 488 Bytes
Versions: 67
Compression:
Stored size: 488 Bytes
Contents
module Excon module Middleware class Expects < Excon::Middleware::Base def response_call(datum) if datum.has_key?(:expects) && ![*datum[:expects]].include?(datum[:response][:status]) raise( Excon::Errors.status_error( datum.reject {|key,value| key == :response}, Excon::Response.new(datum[:response]) ) ) else @stack.response_call(datum) end end end end end
Version data entries
67 entries across 67 versions & 4 rubygems