convertToURLEncoded()

The ServiceLib.convertToURLEncoded() system function converts a string into an encoded Universal Resource Identifier (URI), which might identify a Web page or represent the resource that will be accessed by a REST service. The function is useful if the input string includes spaces or other characters that are not valid in a URI. For example, if the input string includes a space (as might occur because a query string is name=John Smith), the function returns a URI that has the following combination in place of the space: %20.

For details on query strings, see “REST for the developer.”

This function is the complement of ServiceLib.convertFromURLEncoded().

Syntax

   URI = ServiceLib.convertToURLEncoded(input STRING in)
URI
The variable that receives the valid URI
input
The input string

Feedback