Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

URL resolve (operations on path etc.)

by bliako (Monsignor)
on Jul 31, 2022 at 07:37 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (None)
    As of 2024-04-25 01:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found