Help for this page

Select Code to Download


  1. or download this
    const url = require('url');
    const x = 'http:/a.com/a/b/c/d/e.json?x=1&y=2';
    const y = '../../../';
    console.log(url.resolve(x, y));
    
  2. or download this
    use URI;
    my $x = 'http:/a.com/a/b/c/d/e.json?x=1&y=2';
    ...
    print $u;
    <c>
    <p>With this result: <c>http:/a.com/a/b/c/d/e.json/../../../?x=1&y=2