I'm making a call to an internal endpoint in order to try and speed up a task.
I don't need to wait for the task (that awaits at that endpoint) to complete for my script to move on, but it's still waiting to finish. I'm using the following:
$argsForRequest = array(
'agency_code' => '1234',
'another_param_here' => $myVar,
'timeout' => 0.01,
'blocking' => false,
'sslverify' => false,
);
$request = new WP_REST_Request( 'POST', '/my/custom/endpoint' );
$request->set_query_params( $argsForRequest );
$response = rest_do_request( $request );
Any idea on what I could be doing wrong?
Thanks!