cURL Command Line Flags ReferenceCommon cURL command line options for HTTP requests, authentication, and headers.
Specifies custom HTTP request method (GET, POST, PUT, DELETE, PATCH).
-X POST
Passes custom HTTP header line to the server.
-H "Content-Type: application/json"
Sends specified data in HTTP POST/PUT body (defaults method to POST).
-d '{"name": "Alice"}'
Sets HTTP Basic Authentication credentials in username:password format.
-u "user:pass"
Submits multipart/form-data content or binary file uploads.
-F "file=@photo.png"
Follows HTTP 3xx redirects to the final destination URL.
-L
Allows insecure SSL connections (disables certificate validation).
-k