GLib.Uri.build
Description: Reference for GLib.Uri.build

### Function

# GLib Uribuild

since: 2.66

#### Declaration [src]

    GUri*
    g_uri_build (
      GUriFlags flags,
      const gchar* scheme,
      const gchar* userinfo,
      const gchar* host,
      gint port,
      const gchar* path,
      const gchar* query,
      const gchar* fragment
    )

#### Description [src]

Creates a new `GUri` from the given components according to `flags`.

See also g_uri_build_with_user(), which allows specifying the components of the “userinfo” separately.

Available since: 2.66

#### Parameters

`flags`

  Type: `GUriFlags`

  Flags describing how to build the `GUri`.

`scheme`

  Type: `const gchar*`

  The URI scheme.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`userinfo`

  Type: `const gchar*`

  The userinfo component, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`host`

  Type: `const gchar*`

  The host component, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`port`

  Type: `gint`

  The port, or `-1`.

`path`

  Type: `const gchar*`

  The path component.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`query`

  Type: `const gchar*`

  The query component, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`fragment`

  Type: `const gchar*`

  The fragment, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `GUri`

A new `GUri`.

The caller of the function takes ownership of the data, and is responsible for freeing it.