GLib.Uri.get_host

### Method

# GLib Uriget_host

since: 2.66

#### Declaration

    const gchar*
    g_uri_get_host (
      GUri* uri
    )

#### Description

Gets `uri`‘s host. This will never have `%`-encoded characters, unless it is non-UTF-8 (which can only be the case if `uri` was created with `G_URI_FLAGS_NON_DNS`).

If `uri` contained an IPv6 address literal, this value will be just that address, without the brackets around it that are necessary in the string form of the URI. Note that in this case there may also be a scope ID attached to the address. Eg, `fe80::1234%``em1` (or `fe80::1234%``25em1` if the string is still encoded).

Available since: 2.66

#### Return value

Type: `const gchar*`

`uri`‘s host.

The data is owned by the instance.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.