lkj/httpstatus

在常量中定义 HTTP 状态码、消息和响应

0.0.1 2018-07-09 07:27 UTC

This package is not auto-updated.

Last update: 2024-09-29 02:46:34 UTC


README

如何安装

composer require lkj/httpstatus

使用场景

当您创建微服务或构建 API 时,此包可能很有用。

如何使用

use HttpStatus\Response;

$response_obj = new Response;

$success_response = $response_obj::SUCCESS_OK;

如果您只需要使用状态码或状态消息,则可以使用 Code 或 Message 类。