public function httpMiddles(Request $request): array
    {
        /** @var \Swoft\Http\Server\HttpDispatcher $dispatcher */
        $dispatcher = \bean('serverDispatcher');
        $middleType = (int)$request->query('type');

        // 1: only return user's
        if ($middleType === 1) {
            return $dispatcher->getMiddlewares();
        }

        return $dispatcher->requestMiddleware();
    }
public function httpMiddles(Request $request): array
    {
        /** @var \Swoft\Http\Server\HttpDispatcher $dispatcher */
        $dispatcher = \bean('serverDispatcher');
        $middleType = (int)$request->query('type');

        // 1: only return user's
        if ($middleType === 1) {
            return $dispatcher->getMiddlewares();
        }

        return $dispatcher->requestMiddleware();
    }
public function httpMiddles ( Request $ request ) : array { /** @var \Swoft\Http\Server\HttpDispatcher $dispatcher */ $ dispatcher = \ bean ( 'serverDispatcher' ) ; $ middleType = ( int ) $ request -> query ( 'type' ) ; // 1: only return user's if ( $ middleType === 1 ) { return $ dispatcher -> getMiddlewares ( ) ; } return $ dispatcher -> requestMiddleware ( ) ; }
Get all registered http middleware list

@RequestMapping(route="http/middles", method=RequestMethod::GET)
@param Request $request
@return array
@throws \Throwable
Get all registered http middleware list