Learn R Programming

dataone (version 2.3.0)

encodeUrlQuery: Encode the Input for a URL Query Segment.

Description

Encodes the characters of the input so they are not interpreted as reserved characters in url strings. Will also encode non-ASCII unicode characters.

Usage

encodeUrlQuery(x, ...)

# S4 method for D1Client encodeUrlQuery(x, querySegment, ...)

Value

the encoded form of the input

Arguments

x

A D1Client object.

...

(Not yet used.)

querySegment

: a string to encode

See Also

D1Client() class description.

Examples

Run this code
if (FALSE) {
d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2")
fullyEncodedQuery <- paste0("q=id:",
    encodeUrlQuery(d1c, encodeSolr("doi:10.6085/AA/YBHX00_XXXITBDXMMR01_20040720.50.5")))
}

Run the code above in your browser using DataLab