I've got a situation where I'd like to do the following:
URI::HTTP.build(Elasticsearch::Client.new.transport.hosts.first)
The above code should take the URL parts and construct a valid URI object. Currently however an error is raised because port is converted to a string in Client#__extract_hosts.
Since the case logic in __extract_hosts uses URI for parsing, should be reasonable to expect that the (eventual) parsed values should also be used to reconstitute a URI object?
I'm willing to dig in an create a PR, but thought I would check here to see if there is a reason I'm not seeing for using strings for ports.
Thanks!