Set timeout on wp_remote_post()

I am trying to use wp_remote_post() like this:

wp_remote_post( $url, array( 'blocking' => false, 'timeout' => 0.1 ) );

The problem is that it seems to always force the timeout to 1s.
I don’t even want to wait for 1s, I just want the remote post to start and immediately go back to my the calling function. ( I have also tried setting timeout => 0 but it always takes 1s to return.)

How can I skip this minimum of 1s?

2 Answers
2

For cURL, a minimum of 1 second applies, as DNS resolution operates at second-resolution only.
See more in wp-includes/class-request.php function request()

Leave a Comment