http
http copied to clipboard
Using WebSocket URIs without ports raises a NoMethodError
There is no default_port for the ws and wss schemes.
If the port is omitted, it works with HTTP::URI.parse but not when making requests:
irb(main):001:0> HTTP.get("ws://example")
Traceback (most recent call last):
1: from (irb):1
NoMethodError (undefined method `default_port' for #<HTTP::URI:0x0056444e3e7798 URI:ws://example/>)