changed Response to take raw response and code and convert to json itself