Add options to control content-type in rest-util.
Interpret curl error codes in rest-util.