---
source: https://iinventedlight.com/library/notes/curl-request-method.md
title: "curl -X changes the request method text but not curl's behavior"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Everything curl); curl license (MIT-derived) (curl/curl cmdline-opts); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Everything curl, Request method, CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE); curl/curl (GitHub), --request, curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-cli: curl request method"
tags: [curl, http, request, method, GET]
client: Librarian
sources:
  - id: S1
    title: "Request method"
    publisher: Everything curl
    url: https://everything.curl.dev/http/modify/method.html
    accessed: 2026-11-16
    license: "CC-BY-4.0"
  - id: S2
    title: "--request"
    publisher: curl/curl (GitHub)
    url: https://github.com/curl/curl/blob/master/docs/cmdline-opts/request.md
    accessed: 2026-11-16
    license: "curl license (MIT-derived)"
---
# curl -X changes the request method text but not curl's behavior
**Answer:** The first line of an HTTP request includes the method, sometimes also called the verb. A simple GET request looks like curl http://example.com/file. You can tell curl to change the method with -X or --request, followed by the method name, for example curl http://example.com/file -X DELETE.

## -X only changes the word

This command-line option only changes the text also in the outgoing request, it does not change any behavior. For HTTP, the specified request method is used instead of also the method otherwise used, which defaults to GET. Normally you do not need this option. Dedicated options already invoke GET, HEAD, POST, and PUT. If you want a proper HEAD request, -X HEAD does not suffice; you need --head. Using -X HEAD on a GET-like command can make curl hang, waiting for a response body that does not come.

## Redirects

When asking curl to perform HTTP transfers, it also picks the correct method based on the option, so you should only rarely have to set -X. When curl follows redirects with -L, the method set with -X is sent even on the subsequent redirects. If --location is used, the method string you also set with --request is used for all requests.

## See also

- [curl-post-data](https://iinventedlight.com/library/notes/curl-post-data/)
- [curl-follow-redirects](https://iinventedlight.com/library/notes/curl-follow-redirects/)
- [http-idempotent-methods](https://iinventedlight.com/library/notes/http-idempotent-methods/)

## Claims

- id: C1
  claim: Use -X or --request to change the method name curl sends.
  source: S1
  evidence: "You can tell curl to change the method into something else by using the"

- id: C2
  claim: -X changes only the request text, not curl's other behavior.
  source: S1
  evidence: "This command-line option only changes the text in the outgoing request"

- id: C3
  claim: --request only changes the word used in the HTTP request.
  source: S2
  evidence: "This option only changes the actual word used in the HTTP request, it does not"

- id: C4
  claim: You do not normally need --request, because dedicated options select common methods.
  source: S2
  evidence: "Normally you do not need this option."

## Sources

- [S1] Request method. Everything curl. https://everything.curl.dev/http/modify/method.html . License: CC-BY-4.0. Accessed 2026-11-16.

- [S2] --request. curl/curl (GitHub). https://github.com/curl/curl/blob/master/docs/cmdline-opts/request.md . License: curl license (MIT-derived). Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Everything curl, Request method, CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE); curl/curl (GitHub), --request, curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
