Implemented a parseResponse function that checks if the response should be a regular json or a jsonp response. Takes a callback to a function which should run res.end