curl_escape: URL encoding

View source: R/escape.R

curl_escapeR Documentation

URL encoding

Description

Escape all special characters (i.e. everything except for a-z, A-Z, 0-9, '-', '.', '_' or '~') for use in URLs.

Usage

curl_escape(url)

curl_unescape(url)

Arguments

url

A character vector (typically containing urls or parameters) to be encoded/decoded

Examples

# Escape strings
out <- curl_escape("foo = bar + 5")
curl_unescape(out)

# All non-ascii characters are encoded
mu <- "\u00b5"
curl_escape(mu)
curl_unescape(curl_escape(mu))

curl documentation built on Sept. 30, 2024, 9:35 a.m.