1Mojolicious::Command::gUeste(r3)Contributed Perl DocumenMtoajtoiloincious::Command::get(3)
2
3
4

NAME

6       Mojolicious::Command::get - Get command
7

SYNOPSIS

9         Usage: APPLICATION get [OPTIONS] URL [SELECTOR|JSON-POINTER] [COMMANDS]
10
11           ./myapp.pl get /
12           ./myapp.pl get -H 'Accept: text/html' /hello.html 'head > title' text
13           ./myapp.pl get //sri:secr3t@/secrets.json /1/content
14           mojo get mojolicious.org
15           mojo get -v -r -o 25 -i 50 google.com
16           mojo get -v -H 'Host: mojolicious.org' -H 'Accept: */*' mojolicious.org
17           mojo get -u 'sri:s3cret' https://mojolicious.org
18           mojo get mojolicious.org > example.html
19           mojo get -M PUT mojolicious.org < example.html
20           mojo get -f 'q=Mojolicious' -f 'size=5' https://metacpan.org/search
21           mojo get -M POST -f 'upload=@example.html' mojolicious.org
22           mojo get mojolicious.org 'head > title' text
23           mojo get mojolicious.org .footer all
24           mojo get mojolicious.org a attr href
25           mojo get mojolicious.org '*' attr id
26           mojo get mojolicious.org 'h1, h2, h3' 3 text
27           mojo get https://fastapi.metacpan.org/v1/author/SRI /name
28           mojo get -H 'Host: example.com' http+unix://%2Ftmp%2Fmyapp.sock/index.html
29
30         Options:
31           -C, --charset <charset>              Charset of HTML/XML content, defaults
32                                                to auto-detection
33           -c, --content <content>              Content to send with request
34           -f, --form <name=value>              One or more form values and file
35                                                uploads
36           -H, --header <name:value>            One or more additional HTTP headers
37           -h, --help                           Show this summary of available options
38               --home <path>                    Path to home directory of your
39                                                application, defaults to the value of
40                                                MOJO_HOME or auto-detection
41           -i, --inactivity-timeout <seconds>   Inactivity timeout, defaults to the
42                                                value of MOJO_INACTIVITY_TIMEOUT or 40
43           -k, --insecure                       Do not require a valid TLS certificate
44                                                to access HTTPS sites
45           -M, --method <method>                HTTP method to use, defaults to "GET"
46           -m, --mode <name>                    Operating mode for your application,
47                                                defaults to the value of
48                                                MOJO_MODE/PLACK_ENV or "development"
49           -o, --connect-timeout <seconds>      Connect timeout, defaults to the value
50                                                of MOJO_CONNECT_TIMEOUT or 10
51           -r, --redirect                       Follow up to 10 redirects
52           -S, --response-size <size>           Maximum response size in bytes,
53                                                defaults to 2147483648 (2GiB)
54           -u, --user <userinfo>                Alternate mechanism for specifying
55                                                colon-separated username and password
56           -v, --verbose                        Print request and response headers to
57                                                STDERR
58

DESCRIPTION

60       Mojolicious::Command::get performs requests to remote hosts or local
61       applications.
62
63       This is a core command, that means it is always enabled and its code a
64       good example for learning to build new commands, you're welcome to fork
65       it.
66
67       See "COMMANDS" in Mojolicious::Commands for a list of commands that are
68       available by default.
69

ATTRIBUTES

71       Mojolicious::Command::get inherits all attributes from
72       Mojolicious::Command and implements the following new ones.
73
74   description
75         my $description = $get->description;
76         $get            = $get->description('Foo');
77
78       Short description of this command, used for the command list.
79
80   usage
81         my $usage = $get->usage;
82         $get      = $get->usage('Foo');
83
84       Usage information for this command, used for the help screen.
85

METHODS

87       Mojolicious::Command::get inherits all methods from
88       Mojolicious::Command and implements the following new ones.
89
90   run
91         $get->run(@ARGV);
92
93       Run this command.
94

SEE ALSO

96       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.
97
98
99
100perl v5.36.0                      2023-01-20      Mojolicious::Command::get(3)
Impressum