Mojolic...and::get(3)
π
Mojolic...and::get β like, the get command, bestie
okay so real talk: this page lives in the User Contributed Perl Documentation corner of the manual universe, and it's literally the docs for Mojolicious::Command::get (yes, the header truncates the name to Mojolic...and::get, that's just man pages being dramatic β¨). ngl it's a whole mood and also genuinely useful, so let's go π«Ά
β¨ SYNOPSIS β¨
the whole vibe in one line, periodt:
Usage: APPLICATION get [OPTIONS] URL [SELECTOR|JSON-POINTER] [COMMANDS]
and here's the receipts β every single example, exactly as written, no cap:
./myapp.pl get /
./myapp.pl get -H 'Accept: text/html' /hello.html 'head > title' text
./myapp.pl get //sri:secr3t@/secrets.json /1/content
mojo get mojolicious.org
mojo get -v -r -o 25 -i 50 google.com
mojo get -v -H 'Host: mojolicious.org' -H 'Accept: */*' mojolicious.org
mojo get -u 'sri:s3cret' https://mojolicious.org
mojo get mojolicious.org > example.html
mojo get -M PUT mojolicious.org < example.html
mojo get -f 'q=Mojolicious' -f 'size=5' https://metacpan.org/search
mojo get -M POST -f 'upload=@example.html' mojolicious.org
mojo get mojolicious.org 'head > title' text
mojo get mojolicious.org .footer all
mojo get mojolicious.org a attr href
mojo get mojolicious.org '*' attr id
mojo get mojolicious.org 'h1, h2, h3' 3 text
mojo get https://fastapi.metacpan.org/v1/author/SRI /name
mojo get -H 'Host: example.com' http+unix://%2Ftmp%2Fmyapp.sock/index.html
π the options (the whole menu, don't skip)
-C,--charset <charset>β charset of your HTML/XML content π defaults to auto-detection (she figures it out herself)-c,--content <content>β the content you're sending along with the request-f,--form <name=value>β one or more form values and file uploads, yes plural, stack 'em-H,--header <name:value>β one or more extra HTTP headers, add as many as your heart desires-h,--helpβ shows this very summary of available options π«Ά--home <path>β path to the home directory of your application, defaults to the value ofMOJO_HOMEor auto-detection-i,--inactivity-timeout <seconds>β inactivity timeout, defaults to the value ofMOJO_INACTIVITY_TIMEOUTor40-k,--insecureβ do not require a valid TLS certificate to access HTTPS sites (iconic but careful energy π)-M,--method <method>β HTTP method to use, defaults to"GET"-m,--mode <name>β operating mode for your application, defaults to the value ofMOJO_MODE/PLACK_ENVor"development"-o,--connect-timeout <seconds>β connect timeout, defaults to the value ofMOJO_CONNECT_TIMEOUTor10-r,--redirectβ follow up to 10 redirects, she'll chase it down πββοΈ-S,--response-size <size>β maximum response size in bytes, defaults to2147483648(2GiB), that's a LOT of bytes bestie-u,--user <userinfo>β alternate mechanism for specifying colon-separated username and password-v,--verboseβ prints request and response headers toSTDERR, for the nosy girlies (me, I'm nosy)
π DESCRIPTION π
Mojolicious::Command::get performs requests to remote hosts or local applications. that's the whole job and she does it flawlessly π
this is a core command, which means it's always enabled β it never gets benched. and its code is lowkey a good example for learning to build new commands, so you're welcome to fork it. go off π
if you wanna see the list of commands available by default, check out "COMMANDS" in Mojolicious::Commands β that's where the whole friend group is listed.
π¦ ATTRIBUTES π¦
Mojolicious::Command::get inherits all attributes from Mojolicious::Command and implements the following new ones. (yes, all of them, she's a nepo baby with talent πΈ)
description
my $description = $get->description;
$get = $get->description('Foo');
short description of this command, used for the command list. like a little bio, but for a command β¨
usage
my $usage = $get->usage;
$get = $get->usage('Foo');
usage information for this command, used for the help screen. the "how do I even use this" of it all π
π₯ METHODS π₯
Mojolicious::Command::get inherits all methods from Mojolicious::Command and implements the following new ones.
run
$get->run(@ARGV);
run this command. that's it, that's the method, main character energy π
π SEE ALSO π
MojoliciousMojolicious::Guides- <https://mojolicious.org>
ok bestie that's the whole page, you're officially educated π go get something cute.
sign-off szn π this beauty was brought to you by perl v5.42.0, dated 2026-07-15, man page Mojolic...and::get(3) β slay, mwah π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Mojolicious 9.480.0-bp160.2.1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms