Module: Azure::Storage::Common::Core::HttpClient
- Included in:
- Azure::Storage::Common::Client
- Defined in:
- lib/azure/storage/common/core/http_client.rb
Instance Method Summary collapse
-
#agents(uri) ⇒ Net::HTTP
Returns the http agent based on uri.
-
#reset_agents! ⇒ Object
Empties all the http agents.
Instance Method Details
#agents(uri) ⇒ Net::HTTP
Returns the http agent based on uri
32 33 34 35 36 37 38 39 |
# File 'lib/azure/storage/common/core/http_client.rb', line 32 def agents(uri) key = uri.to_s @agents ||= {} unless @agents.key?(key) @agents[key] = build_http(uri) end @agents[key] end |
#reset_agents! ⇒ Object
Empties all the http agents
42 43 44 |
# File 'lib/azure/storage/common/core/http_client.rb', line 42 def reset_agents! @agents = nil end |