Working requestToCortex method. Currently has issues with timed out requests.