module HTTPX::URIExtensions

  1. lib/httpx/extensions.rb

Methods

Public Instance

  1. altsvc_match?
  2. authority
  3. origin

Public Instance methods

altsvc_match? (uri)
[show source]
   # File lib/httpx/extensions.rb
68 def altsvc_match?(uri)
69   uri = URI.parse(uri)
70   self == uri || begin
71     case scheme
72     when 'h2'
73       uri.scheme == "https" &&
74       host == uri.host &&
75       (port || default_port) == (uri.port || uri.default_port)
76     else
77       false
78     end
79   end
80 end
authority ()
[show source]
   # File lib/httpx/extensions.rb
59 def authority
60   port_string = port == default_port ? nil : ":#{port}"
61   "#{host}#{port_string}"
62 end
origin ()
[show source]
   # File lib/httpx/extensions.rb
64 def origin
65   "#{scheme}://#{authority}"
66 end