def typed_request_for(webmock_request, remove = false)
if webmock_request.instance_variables.find { |v| v.to_sym == :@__typed_vcr_request }
meth = remove ? :remove_instance_variable : :instance_variable_get
return webmock_request.send(meth, :@__typed_vcr_request)
end
warn "|WARNING: There appears to be a bug in WebMock's after_request hook\n| and VCR is attempting to work around it. Some VCR features\n| may not work properly.\n".gsub(/^\s+\|/, '')
Request::Typed.new(vcr_request_for(webmock_request), :unknown)
end