Skip to contents

Function to create a user agent string for HTTP requests.

Usage

user_agent(
  package = "gmhleasr",
  version = utils::packageVersion("gmhleasr"),
  url = desc::desc_get("URL", system.file("DESCRIPTION", package = package))[[1]],
  overwrite = FALSE
)

Arguments

package

Package name. Default is "gmhleasr".

version

Package version. Default is the current version of "gmhleasr".

url

Package URL. Default is the URL from the package's DESCRIPTION file.

Value

User agent string.

Examples

user_agent("gmhleasr", "0.0.1")
#> gmhleasr/0.0.1 (https://github.com/noclocks/gmhleasr,
#>         https://docs.noclocks.dev/gmhleasr/)