url_build: Builds a URL string from its components.

View source: R/RcppExports.R

url_buildR Documentation

Builds a URL string from its components.

Description

Builds a URL string from its components.

Usage

url_build(url_components)

Arguments

url_components

A list containing the components of the URL: scheme, host, port, path, query, and fragment.

  • scheme A character string for the new scheme (e.g., "http" or "https") or NULL to keep it unchanged.

  • host A character string for the new host or NULL to keep it unchanged.

  • port A character string for the new port or NULL to keep it unchanged.

  • path A character string for the new path or NULL to keep it unchanged.

  • query A list or character of new query parameters or NULL to keep it unchanged.

  • fragment A character string for the new fragment or NULL to keep it unchanged.

Value

A URL string constructed from the provided components

Examples

library(urlparse)
url_build(list(
  scheme = "https",
  user = "",
  password = "",
  host = "host.com",
  port = 8000,
  path = "/path",
  query = "query",
  fragment = "fragment"
))


urlparse documentation built on April 15, 2025, 1:16 a.m.