There's no need to guess at the meaning of the options for curl, since you already know where the manpage is. You are of course correct in your interpretation of -d
(request body) and -H
(headers). And -u
is on the man page as supplying the user and password.
I'm not aware that anyone has created a mapping of all curl options to their effect on building an HTTP request. Many are obvious, though, from the descriptions on the manpage. Some, like -i
affect how curl shows it output so they have no effect.
In the case of -u
if you really want to know what this does to your request, you can see the Wikipedia page on HTTP Basic Authentication to see what the auth header looks like (it uses Base64 encoding and is interesting in its own right). Programmers needn't bother with the Base64 encoding so clients, like curl, give you a way to specify auth values in a user-convenient manner.
Ultimately your request will have an initial line with the method, path, and version, then a bunch of headers, and then a body. How curl creates the request would best be found in the curl source code, perhaps (only slightly kidding here), but you can learn a lot by experimentation. Fire off some requests with curl using the -v
(verbose) option! Look at the lines starting with >
and you will see your request! This is a very nice way to learn both curl and HTTP in general.