xref: /curl/docs/cmdline-opts/_URL.md (revision 6e494a23)
1<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
2<!-- SPDX-License-Identifier: curl -->
3# URL
4The URL syntax is protocol-dependent. You find a detailed description in
5RFC 3986.
6
7If you provide a URL without a leading **protocol://** scheme, curl guesses
8what protocol you want. It then defaults to HTTP but assumes others based on
9often-used hostname prefixes. For example, for hostnames starting with `ftp.`
10curl assumes you want FTP.
11
12You can specify any amount of URLs on the command line. They are fetched in a
13sequential manner in the specified order unless you use --parallel. You can
14specify command line options and URLs mixed and in any order on the command
15line.
16
17curl attempts to reuse connections when doing multiple transfers, so that
18getting many files from the same server do not use multiple connects and setup
19handshakes. This improves speed. Connection reuse can only be done for URLs
20specified for a single command line invocation and cannot be performed between
21separate curl runs.
22
23Provide an IPv6 zone id in the URL with an escaped percentage sign. Like in
24
25    "http://[fe80::3%25eth0]/"
26
27Everything provided on the command line that is not a command line option or
28its argument, curl assumes is a URL and treats it as such.
29