MAKS\AmqpAgent\Helper\Utility::respond
Returns an HTTP Response to the browser and lets blocking code that comes after this function to continue executing in the background.
This function is useful for example in Controllers that do some long-running tasks, and you just want to inform the client that the job has been started. Please note that this function is tested MANUALLY ONLY, it is provided as is, there is no guarantee that it will work as expected nor on all platforms.
Signature
public function respond(string
$body,
[integer
$status = 200,
[array
$headers = ]] )
Parameters
$body
— string- The response body.
$status
— integer- [optional] The response status code.
$headers
— array- [optional] An associative array of additional response headers `['headerName' => 'headerValue']`.
Returns
- void
Test Coverage
Information
- Coverage: 0/0 Lines (100%)
- Tests: 0
- Passed: 0 (0%)