Parses the response headers and body into proper JSON to display on the front-end