Module: LaunchDarkly::Impl::Util
- Defined in:
- lib/ldclient-rb/impl/util.rb
Overview
Class Method Summary collapse
Class Method Details
.current_time_millis ⇒ Object
5 6 7 |
# File 'lib/ldclient-rb/impl/util.rb', line 5 def self.current_time_millis (Time.now.to_f * 1000).to_i end |
.default_http_headers(sdk_key, config) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/ldclient-rb/impl/util.rb', line 9 def self.default_http_headers(sdk_key, config) ret = { "Authorization" => sdk_key, "User-Agent" => "RubyClient/" + LaunchDarkly::VERSION } if config.wrapper_name ret["X-LaunchDarkly-Wrapper"] = config.wrapper_name + (config.wrapper_version ? "/" + config.wrapper_version : "") end ret end |