This commit is contained in:
2021-04-27 16:51:23 +08:00
parent 3646bab56e
commit 3310d45f15
+2 -3
View File
@@ -291,14 +291,13 @@ class Response extends HttpService
/** /**
* @param null $response * @param null $response
* @return static * @return static
* @throws ReflectionException * @throws Exception
* @throws NotFindClassException
*/ */
public static function create($response = null): static public static function create($response = null): static
{ {
Context::setContext('response', $response); Context::setContext('response', $response);
$ciResponse = Snowflake::createObject(Response::class); $ciResponse = Snowflake::getApp('response');
$ciResponse->response = $response; $ciResponse->response = $response;
$ciResponse->startTime = microtime(true); $ciResponse->startTime = microtime(true);
$ciResponse->format = self::JSON; $ciResponse->format = self::JSON;