### Method

# Soup Session set_user_agent

#### Declaration [src]

    void
    soup_session_set_user_agent (
      SoupSession* session,
      const char* user_agent
    )

#### Description [src]

Set the value to use for the “User-Agent” header on `SoupMessage`s sent from `session`.

If `user_agent` has trailing whitespace, `session` will append its own product token (eg, `libsoup/3.0.0`) to the end of the header for you. If `user_agent` is `NULL` then no “User-Agent” will be included in requests. See `SoupSession:user-agent` for more information.

Sets property | `Soup.Session:user-agent`

#### Parameters

`user_agent`

  Type: `const char*`

  The user agent string.

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