xref: /curl/docs/cmdline-opts/request-target.md (revision e7219c2b)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: request-target
5Arg: <path>
6Help: Specify the target for this request
7Protocols: HTTP
8Added: 7.55.0
9Category: http
10Multi: single
11See-also:
12  - request
13Example:
14  - --request-target "*" -X OPTIONS $URL
15---
16
17# `--request-target`
18
19Use an alternative target (path) instead of using the path as provided in the
20URL. Particularly useful when wanting to issue HTTP requests without leading
21slash or other data that does not follow the regular URL pattern, like
22"OPTIONS *".
23
24curl passes on the verbatim string you give it its the request without any
25filter or other safe guards. That includes white space and control characters.
26