curlEscape {RCurl}R Documentation

Handle characters in URL that need to be escaped

Description

These functions convert between URLs that are human-readable and those that have special characters escaped. For example, to send a URL with a space, we need to represent the space as %20.

Usage

curlEscape(urls)
curlUnescape(urls)

Arguments

urls a character vector giving the strings to be escaped or unescaped.

Details

This calls curl_escape or curl_unescape in the libcurl library.

Value

A character vector that has corresponding elements to the input with the characters escaped or not.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

Curl homepage http://curl.haxx.se

Examples

  curlEscape("http://www.abc.com?x=a is a sentence&a b=and another")

  # Reverse it should get back original
  curlUnescape(curlEscape("http://www.abc.com?x=a is a sentence&a b=and another"))

[Package RCurl version 0.6-0 Index]