Here is an example of command line that fit this description :
curl http://dumbdomain.com/solr/collection2/update/json -H \'Content-type:applic
In case you're using Windows (this problem typically doesn't occur on *nix), you can pipe the output from echo to curl to avoid the escaping altogether:
echo {"foo": "bar", "xyzzy": "fubar"} | curl -X POST -H "Content-Type: application/json" -d @- localhost:4444/api/foo