Skip to content

qie.urlEncode

Signature: qie.urlEncode(value)

Returns: String urlEncoded - an encoded value that can safely be used in a URL

Encodes the value to ensure that no invalid URL characters are present.

Parameters

Type Name Description Default
String value to be encoded

Example

// Encode a string so it can be safely used as a URL parameter
var encodedValue = qie.urlEncode("FastAPI & lang=en"); // FastAPI%20%26%20lang%3Den