112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# File 'lib/network_resiliency/adapter/http.rb', line 112
def transport_request(req, &block)
return super unless NetworkResiliency.enabled?(:http)
path = URI.parse(req.path).path
destination = [
address,
req.method.downcase,
normalize_path(path),
].join(":")
idepotent = Net::HTTP::IDEMPOTENT_METHODS_.include?(req.method)
with_resilience(:request, destination, idepotent) do |timeout|
req[REQUEST_TIMEOUT_HEADER] = timeout
super
end
end
|