What’s the difference between Uri.Host and Uri.Authority

Yes Brandon is absolutely correct, in layman terms

Authority = Host Name + Port No

And if URL protocol is using a default port, say port 80 for http URL, then only in that case
Authority = Host Name (Port No is assumed to be 80),

Whereas Host Name is either Domain Name or I.P Address

Example:

  1. http://www.example.com/

    Authority = www.example.com
    Host Name = www.example.com

  2. http://255.255.255.255:8080/

    Authority = 255.255.255.255:8080
    Host Name = 255.255.255.255

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)