trim curl response of whitespace