class RequestInterceptor::Transaction::Request
Public Instance Methods
body?(body_matcher)
click to toggle source
# File lib/request_interceptor/transaction.rb, line 59 def body?(body_matcher) return true if body_matcher.nil? body = case self["Content-Type"] when "application/json" ActiveSupport::JSON.decode(self.body).deep_symbolize_keys! else self.body end body_matcher === body end
method?(method)
click to toggle source
# File lib/request_interceptor/transaction.rb, line 29 def method?(method) normalized_method = method.to_s.upcase normalized_method == self.method end
path()
click to toggle source
# File lib/request_interceptor/transaction.rb, line 38 def path uri.path end
path?(path)
click to toggle source
# File lib/request_interceptor/transaction.rb, line 34 def path?(path) path === self.path end
query()
click to toggle source
# File lib/request_interceptor/transaction.rb, line 50 def query Rack::Utils.parse_nested_query(uri.query).deep_symbolize_keys! end
query?(query_matcher)
click to toggle source
# File lib/request_interceptor/transaction.rb, line 54 def query?(query_matcher) return true if query_matcher.nil? query_matcher === self.query end
request_uri()
click to toggle source
# File lib/request_interceptor/transaction.rb, line 46 def request_uri uri.request_uri end
request_uri?(request_uri)
click to toggle source
# File lib/request_interceptor/transaction.rb, line 42 def request_uri?(request_uri) request_uri === self.request_uri end