xref: /aosp_15_r20/external/curl/docs/cmdline-opts/_URL.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<!-- Copyright (C) Daniel Stenberg, <[email protected]>, et al. -->
2*6236dae4SAndroid Build Coastguard Worker<!-- SPDX-License-Identifier: curl -->
3*6236dae4SAndroid Build Coastguard Worker# URL
4*6236dae4SAndroid Build Coastguard WorkerThe URL syntax is protocol-dependent. You find a detailed description in
5*6236dae4SAndroid Build Coastguard WorkerRFC 3986.
6*6236dae4SAndroid Build Coastguard Worker
7*6236dae4SAndroid Build Coastguard WorkerIf you provide a URL without a leading **protocol://** scheme, curl guesses
8*6236dae4SAndroid Build Coastguard Workerwhat protocol you want. It then defaults to HTTP but assumes others based on
9*6236dae4SAndroid Build Coastguard Workeroften-used hostname prefixes. For example, for hostnames starting with `ftp.`
10*6236dae4SAndroid Build Coastguard Workercurl assumes you want FTP.
11*6236dae4SAndroid Build Coastguard Worker
12*6236dae4SAndroid Build Coastguard WorkerYou can specify any amount of URLs on the command line. They are fetched in a
13*6236dae4SAndroid Build Coastguard Workersequential manner in the specified order unless you use --parallel. You can
14*6236dae4SAndroid Build Coastguard Workerspecify command line options and URLs mixed and in any order on the command
15*6236dae4SAndroid Build Coastguard Workerline.
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Workercurl attempts to reuse connections when doing multiple transfers, so that
18*6236dae4SAndroid Build Coastguard Workergetting many files from the same server do not use multiple connects and setup
19*6236dae4SAndroid Build Coastguard Workerhandshakes. This improves speed. Connection reuse can only be done for URLs
20*6236dae4SAndroid Build Coastguard Workerspecified for a single command line invocation and cannot be performed between
21*6236dae4SAndroid Build Coastguard Workerseparate curl runs.
22*6236dae4SAndroid Build Coastguard Worker
23*6236dae4SAndroid Build Coastguard WorkerProvide an IPv6 zone id in the URL with an escaped percentage sign. Like in
24*6236dae4SAndroid Build Coastguard Worker
25*6236dae4SAndroid Build Coastguard Worker    "http://[fe80::3%25eth0]/"
26*6236dae4SAndroid Build Coastguard Worker
27*6236dae4SAndroid Build Coastguard WorkerEverything provided on the command line that is not a command line option or
28*6236dae4SAndroid Build Coastguard Workerits argument, curl assumes is a URL and treats it as such.
29