@@ -157,7 +157,7 @@ def encode_params(options = {})
157157 options [ :params ] [ :withStackTrace ] = true
158158 end
159159
160- pairs = options [ :params ] . filter_map { |key , value |
160+ pairs = options [ :params ] . map { |key , value |
161161 next if value . nil?
162162
163163 # If the value is an array, we 'demultiplex' into several
@@ -169,7 +169,7 @@ def encode_params(options = {})
169169 else
170170 "#{ CGI . escape key . to_s } =#{ CGI . escape value . to_s } "
171171 end
172- }
172+ } . compact
173173 pairs . flatten!
174174 return nil if pairs . empty?
175175 "?#{ pairs . join '&' } "
@@ -197,7 +197,10 @@ def request(method, relative_uri, options = {})
197197 head . update options [ :head ] if options [ :head ]
198198 head . delete_if { |_ , value | value . nil? }
199199
200+ puts "Tung====================#{ relative_uri } #{ options } "
200201 uri = build_uri ( relative_uri , options )
202+
203+ puts "Tung====================#{ uri } "
201204 request = METHODS [ method ] . new uri . request_uri , head
202205
203206 # Configure multi-tenancy headers, if enabled
@@ -276,6 +279,9 @@ def request(method, relative_uri, options = {})
276279 end
277280
278281 response = http . start { http . request request }
282+ puts "Tungrequest====================#{ request . to_hash } "
283+ puts "Tungrequest====================#{ request . body } "
284+ puts "Tungresponse====================#{ response . body } "
279285 code = response . code . to_i
280286
281287 # Add profiling data if required
0 commit comments