Fix quotes.
Replace long xml strings with HEREDOCs.
Document need for setting content-type.