The Response component is in charge of providing a common response interface.
# Creating Response
Create a response by passing named data.
use Chevere\Response\Response; $response = new Response(key: 'value');
# With data
withData method is used to set the Response data.
$response = $response ->withData(foo: $foo, bar: $bar);
# With code
withCode method is used to set Response code.
$response = $response->withCode(code: 0);
# Response codes
uuid method is used to access to the Response UUID (opens new window) (V4).
$uuid = $response->uuid();
token method is used to access to the Response token.
$token = $response->token();
data method is used to access to the Response data.
$data = $response->data();
code method is used to access to the Response code.
$code = $response->code();