Making an IPv6 URLRequest
I’m trying to make a URL GET request to a service I’m discovering via Bonjour.
I have gotten a
NWBrowser.Result
, and I’ve gotten anNWEndpoint
.The endpoint is an IPv6 link local address.
How the hell do I make a
URLRequest
to this? I don’t seem to be able to construct a URL from what I’ve got, but I suspect I’m holding it wrong.[…]
Wait, it seems the presence of “%en0” at the end may be the problem?
In a browser you would enter an IPV6 address like this: https://[XXXXXIPV6ADDRESS]/index.html
my reading of RFC 6874 is that you must percent-escape the %: http://[<IPv6address>%25<zoneID>]
TIL about encoding a desired network interface as part of the host name into a URL
It’s interesting that he asked on Mastodon rather than on Stack Overflow.
See also:
Previously:
- The Mess at Stack Overflow
- The Monkey and the Apple
- Roku Doesn’t Support IPv6
- North America Out of New IPv4 Addresses