Method: HTTPX::Channel#coalescable?

Defined in:
lib/httpx/channel.rb

#coalescable?(channel) ⇒ Boolean

coalescable channels need to be mergeable! but internally, #mergeable? is called before #coalescable?

Returns:

  • (Boolean)


94
95
96
97
98
99
100
# File 'lib/httpx/channel.rb', line 94

def coalescable?(channel)
  if @io.protocol == "h2" && @uri.scheme == "https"
    @io.verify_hostname(channel.uri.host)
  else
    @uri.origin == channel.uri.origin
  end
end