Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions contract-tests/client_entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ def initialize(log, config)
data_system.fdv1_compatible_synchronizer(build_fdv1_fallback_builder(fdv1_fallback_config))
end

if data_system_config[:payloadFilter]
opts[:payload_filter_key] = data_system_config[:payloadFilter]
end

opts[:data_system_config] = data_system.build
elsif config[:streaming]
streaming = config[:streaming]
Expand Down
21 changes: 3 additions & 18 deletions lib/ldclient-rb/impl/data_system/polling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,9 @@ def initialize(sdk_key, http_config, config)
# @return [Result]
#
def fetch(selector)
query_params = []
query_params << ["filter", @config.payload_filter_key] unless @config.payload_filter_key.nil?

if selector && selector.defined?
query_params << ["basis", selector.state]
end

uri = @poll_uri
if query_params.any?
filter_query = URI.encode_www_form(query_params)
uri = "#{uri}?#{filter_query}"
if selector && selector.defined?
uri = "#{uri}?#{URI.encode_www_form(basis: selector.state)}"
end

headers = {}
Expand Down Expand Up @@ -384,7 +376,7 @@ class HTTPFDv1PollingRequester
#
# @param sdk_key [String]
# @param http_config [HttpConfigOptions] HTTP connection settings
# @param config [LaunchDarkly::Config] Used for global header settings and payload_filter_key
# @param config [LaunchDarkly::Config] Used for global header settings
#
def initialize(sdk_key, http_config, config)
@etag = nil
Expand All @@ -401,14 +393,7 @@ def initialize(sdk_key, http_config, config)
# @return [Result]
#
def fetch(selector)
query_params = []
query_params << ["filter", @config.payload_filter_key] unless @config.payload_filter_key.nil?

uri = @poll_uri
if query_params.any?
filter_query = URI.encode_www_form(query_params)
uri = "#{uri}?#{filter_query}"
end

headers = {}
Impl::Util.default_http_headers(@sdk_key, @config).each { |k, v| headers[k] = v }
Expand Down
1 change: 0 additions & 1 deletion lib/ldclient-rb/impl/data_system/streaming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def sync(ss)
client.query_params do
selector = ss.selector
{
"filter" => @config.payload_filter_key,
"basis" => (selector.state if selector&.defined?),
}.compact
end
Expand Down
1 change: 0 additions & 1 deletion spec/impl/data_system/streaming_headers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module DataSystem
"Config",
logger: logger,
stream_uri: "https://stream.example.com",
payload_filter_key: nil,
socket_factory: nil,
initial_reconnect_delay: 1,
instance_id: nil
Expand Down
1 change: 0 additions & 1 deletion spec/impl/data_system/streaming_synchronizer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module DataSystem
"Config",
logger: logger,
stream_uri: "https://stream.example.com",
payload_filter_key: nil,
socket_factory: nil,
initial_reconnect_delay: 1,
instance_id: nil
Expand Down
Loading