Yii2 components

Component namespace:

Response component: yii\web\Response

Yii predefined HTTP exception components:

yii\web\BadRequestHttpException:   //Status code 400 . 
yii\web\ConflictHttpException:      //Status code 409 . 
yii\web\ForbiddenHttpException:  // Status code 403. 
yii\web\GoneHttpException:          // Status code 410. 
yii\web\MethodNotAllowedHttpException: // Status code 405. 
yii\web\NotAcceptableHttpException: // Status code 406. 
yii\web\NotFoundHttpException: // Status code 404. 
yii\web\ServerErrorHttpException: // Status code 500. 
yii\web\TooManyRequestsHttpException: // Status code 429. 
yii\web\UnauthorizedHttpException: // Status code 401.
yii\web\UnsupportedMediaTypeHttpException: // Status code 415. 
yii\web\HttpException(status code ); // other exceptions

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325730278&siteId=291194637