For less citation, read standard input instead.
curl -k -X POST -H 'Content-Type: application/json' -d @- <<EOF { "username": "$USERNAME", "password": "$PASSWORD"} EOF
-d @foo is read from a file named foo . If you use - as a file name, it reads from standard input. Here, standard input is provided from the document here, which is treated as a string with two quotation marks without actually including it in double quotation marks.
source share