urlencode

STRINGurlencodeSTRINGinput

Available in all subroutines.

Encodes a string for use in a URL. This is also known as percent-encoding. For example, urlencode("hello world"); will return "hello%20world".

This function is not prefixed with the std. namespace.

Example

set req.url = req.url "?cookie=" urlencode(req.http.Cookie);

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.