code: function promiseResult (options, data) {
  		log(`promiseResult: data ${data}`);
  		return new Promise((resolve, reject) => {
  			/* Check cache to avoid I/O. */
  			const cacheHit = checkCache(config, pattern);
  			if (cacheHit !== RESPONSE_UNKNOWN) {
  				log(`Cache hit: ${cacheHit}`);
  				return resolve(cacheHit);
  			}
  
  			const req = https.request(options, (res) => {
  				res.setEncoding('utf8');
  
  				let response = '';
  				res.on('data', (chunk) => {
  					log(`Got data`);
  					response += chunk;
  				});
  
  				res.on('end', () => {
  					log(`end: I got ${JSON.stringify(response)}`);
  
  					const result = serverResponseToRESPONSE(response);
  					log(`end: result ${result}`);
  					updateCache(config, postObject.pattern, result);
  
  					if (result === RESPONSE_INVALID) {
  						return reject(result);
  					} else {
  						return resolve(result);
  					}
  				});
  			});
  
  			req.on('error', (e) => {
  				log(`Error: ${e}`);
  				return reject(RESPONSE_INVALID);
  			});
  
  			// Write data to request body.
  			log(`Writing to req:\n${data}`);
  			req.write(data);
  			req.end();
  		});
  	}
docs: Wrapper so we can return a Promise.