add control over response pretty printing

Added a flag to control whether or not a response is pretty printed - the default behavior matches the current behavior.