function request( error, headers, body ) {
	if ( arguments.length === 1 ) {
		return req1;
	}
	return req2;

	function req1( opts, clbk ) {
		setTimeout( onTimeout, 0 );
		function onTimeout() {
			var err;
			if ( error instanceof Error ) {
				err = {
					'status': 500,
					'message': error.message
				};
			} else {
				err = error;
			}
			clbk( err );
		}
	}

	function req2( opts, clbk ) {
		setTimeout( onTimeout, 0 );
		function onTimeout() {
			var err;
			var res;
			if ( error instanceof Error ) {
				err = {
					'status': 500,
					'message': error.message
				};
				return clbk( err );
			}
			err = error;
			res = {};
			res.headers = headers;
			clbk( err, res, body );
		}
	}
}
Returns a mock request function.

@private
@param {(Error|Object|null)} error - an error object or null
@param {(Object|null)} headers - response headers or null
@param {(Object|Array|null)} body - response body or null
@returns {Function} mock request