Send an HTTP POST request as if submitting an HTML form using curl

curl --data "title=recipe&text=steps123" https://example.com

November 13, 2023bashoneliners


Provide the key-value pairs of the form fields to submit in the --data parameter, separated by &, all as a single string value.

The example command above sets the form fields:

  • title=recipe
  • text=steps123