Function

GLib-2.0GLiburi_build_with_userSince 2.66

  • Creates a new GLib.Uri from the given components according to flags (GLib.UriFlags.HAS_PASSWORD is added unconditionally). The flags must be coherent with the passed values, in particular use %-encoded values with GLib.UriFlags.ENCODED.

    In contrast to g_uri_build(), this allows specifying the components of the ‘userinfo’ field separately. Note that user must be non-null if either password or auth_params is non-null.

    Parameters

    • flags: GLib.UriFlags

      flags describing how to build the GLib.Uri

    • scheme: string

      the URI scheme

    • user: string

      the user component of the userinfo, or null

    • password: string

      the password component of the userinfo, or null

    • auth_params: string

      the auth params of the userinfo, or null

    • host: string

      the host component, or null

    • port: number

      the port, or -1

    • path: string

      the path component

    • Optionalquery: string

      the query component, or null

    • Optionalfragment: string

      the fragment, or null

    Returns GLib.Uri

    a new GLib.Uri

    2.66