eee
This commit is contained in:
+6
-4
@@ -99,11 +99,13 @@ class Handler implements RequestHandlerInterface
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
if (is_object($result)) {
|
if (is_object($result)) {
|
||||||
$result = '[object]';
|
return \response()->withBody(new Stream('[object]'));
|
||||||
} else if (is_array($result)) {
|
}
|
||||||
$result = json_encode($result, JSON_UNESCAPED_UNICODE);
|
if (is_array($result)) {
|
||||||
|
return \response()->withContentType(ContentType::JSON)->withBody(new Stream(json_encode($result, JSON_UNESCAPED_UNICODE)));
|
||||||
|
} else {
|
||||||
|
return \response()->withBody(new Stream($result));
|
||||||
}
|
}
|
||||||
return \response()->withBody(new Stream($result));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user