Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

URL resolve (operations on path etc.)

by bliako (Monsignor)
on Jul 31, 2022 at 07:37 UTC ( #11145863=perlquestion: print w/replies, xml ) Need Help??

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
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11145863]
Approved by haukex
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-11-30 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?