xref: /aosp_15_r20/external/curl/docs/cmdline-opts/get.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: get
5*6236dae4SAndroid Build Coastguard WorkerShort: G
6*6236dae4SAndroid Build Coastguard WorkerHelp: Put the post data in the URL and use GET
7*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
8*6236dae4SAndroid Build Coastguard WorkerCategory: http
9*6236dae4SAndroid Build Coastguard WorkerAdded: 7.8.1
10*6236dae4SAndroid Build Coastguard WorkerMulti: boolean
11*6236dae4SAndroid Build Coastguard WorkerSee-also:
12*6236dae4SAndroid Build Coastguard Worker  - data
13*6236dae4SAndroid Build Coastguard Worker  - request
14*6236dae4SAndroid Build Coastguard WorkerExample:
15*6236dae4SAndroid Build Coastguard Worker  - --get $URL
16*6236dae4SAndroid Build Coastguard Worker  - --get -d "tool=curl" -d "age=old" $URL
17*6236dae4SAndroid Build Coastguard Worker  - --get -I -d "tool=curl" $URL
18*6236dae4SAndroid Build Coastguard Worker---
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard Worker# `--get`
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerWhen used, this option makes all data specified with --data, --data-binary or
23*6236dae4SAndroid Build Coastguard Worker--data-urlencode to be used in an HTTP GET request instead of the POST request
24*6236dae4SAndroid Build Coastguard Workerthat otherwise would be used. curl appends the provided data to the URL as a
25*6236dae4SAndroid Build Coastguard Workerquery string.
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard WorkerIf used in combination with --head, the POST data is instead appended to the
28*6236dae4SAndroid Build Coastguard WorkerURL with a HEAD request.
29