function getReq(spec, shim) {
  return shim.isFunction(spec.req) ? spec.req : makeGetReq(shim, spec.req)
}
Retrieves the req function that is called to retrieve the request

@private
@param {object} spec middleware spec
@param {Shim} shim instance of shim
@returns {Function} function to call to obtain request object