UTF-8 Decoding of a URL

Steps

  1. Create a project utils_url.
  2. Create a JavaScript service with the name url_decode.js.
  3. Enter the following content:
1
2
3
4
5
6
7
8
9
10
11
12
13
var url = require('utils/v3/url');
var response = require('http/v3/response');

var input = 'http%3A%2F%2Fwww.dirigible.io%2F';
var result = url.decode(input, 'UTF-8');

console.log(('Decoded URL: ' + result));
response.println(JSON.stringify(result));

response.flush();
response.close();


For more information, see the API documentation.

Edit