how to get URL?

447 views
Skip to first unread message

Renato Forti

unread,
Oct 13, 2012, 2:06:21 PM10/13/12
to mojol...@googlegroups.com

Hi All,

Have any way to get a URL (full and part of it), for sample, if I have this url:

https://www.doksafe.com/system/build?pid=PDx00002&token=17722a8d-02ec-45c3-9a94-132950874226

If I want get: https, doksafe.com and so on?

s...@bykov.odessa.ua

unread,
Oct 13, 2012, 2:57:35 PM10/13/12
to mojol...@googlegroups.com
Do you mean this?

use Mojo::URL;
my $url = Mojo::URL->new('https://foo.bar/baz?popa');
say $url->scheme;
say $url->host;



--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mojolicious/-/WCsu_OKgDOYJ.
To post to this group, send email to mojol...@googlegroups.com.
To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.

Renato Forti

unread,
Oct 14, 2012, 10:04:37 AM10/14/12
to mojol...@googlegroups.com
Yes, but I want get the addr that browser is!
For sample, if user is on : https://www.dok.com/home

I want:

use Mojo::URL;
my $url = Mojo::URL->new(addres from browser  window!);

Thanks alo for help!

Robert Stockdale

unread,
Nov 1, 2012, 1:13:42 AM11/1/12
to mojol...@googlegroups.com

Renato Forti

unread,
Nov 3, 2012, 1:34:00 PM11/3/12
to mojol...@googlegroups.com
Yes!!! :0) tks...
Reply all
Reply to author
Forward
0 new messages