Multiline curl command

For Linux and MacOS: Use the \ escape character:

curl "http://WEBSITE" -H "Host: WEBSITE" \
-H "Accept: text/html,application/xhtml+xml \
,application/xml;q=0.9,*/*;q=0.8"

For Windows: Use the ^ escape character:

curl "http://WEBSITE" -H "Host: WEBSITE" ^
-H "Accept: text/html,application/xhtml+xml ^
,application/xml;q=0.9,*/*;q=0.8"

NOTE: watch out for the tendency to indent on multiple line commands, as it will embed spaces and screw up the curl command. the sed command replaces embedded spaces within the variables with the %20 string so that spaces can be used embedded in the strings you pass as variables

messageout="The rain in Spain stays mainly in the plains"
summaryout="This is a test record"
alertnameout="Test Alert"


curl -v -silent request POST "URL.com?\
summary=`echo $summaryout | sed -e 's/ /%20/g'`&\
alertname=`echo $alertnameout | sed -e 's/ /%20/g'`&\
message=`echo $messageout | sed -e 's/ /%20/g'`"

If you are running Windows, I have found it easier to install Git and use Git Bash to run Curl. This was initially suggested in a separate article: https://stackoverflow.com/a/57567112/5636865.