Module: We::Call::Connection
Defined Under Namespace
Classes: MissingApp, MissingEnv, MissingOpenTimeout, MissingTimeout
Constant Summary collapse
- OPEN_TIMEOUT =
If your network isn’t stable enough to get a sign of life in 1s then you should look into that Or override this default on creating the connection.
1- DEFAULT_ADAPTER_CLASS =
We use typhoeus instead of default NetHTTP so we can control how many retries are made github.com/lostisland/faraday/issues/612
Faraday::Adapter::Typhoeus
- DEFAULT_ADAPTER =
:typhoeus- QueryableBuilder =
Class.new(Faraday::RackBuilder) do def adapter? @has_adapter || false end def adapter(key, *args, &block) super @has_adapter = true end end
Instance Method Summary collapse
Instance Method Details
#new(host:, timeout: nil, open_timeout: OPEN_TIMEOUT, app: guess_app, env: guess_env) {|Faraday| ... } ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/we/call/connection.rb', line 39 def new(host:, timeout: nil, open_timeout: OPEN_TIMEOUT, app: guess_app, env: guess_env, &block) @host = host @app = app or raise_missing_app! @env = env or raise_missing_env! @timeout = timeout or raise_missing_timeout! @open_timeout = open_timeout or raise_missing_open_timeout! create(&block) end |