urlencode
Available inall 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
BETADo you see an error in this page? Do have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact support@fastly.com)