I installed the yii2-httpclient extension.
The extension uses the stream transport by default and works well for me when doing a non https request.
When requesting an external api call using https and the default transport(stream) the call works, but it is delayed 30 seconds.
When making a call using http it takes around 450ms(much quicker).
If I switch the transport to use curl instead of stream, both the http and https calls take under a second for the request to finish.
I have and updated Cacert.pem defined for curl.
I also tried setting the same cacert.pem for stream using the sslVerifyPeer abd sslCafile options, but it still times out at 30 seconds.
Does anyone know why the "stream transport" would be timing out when making https calls or if it has anything to do with sslVerifyPeer?
Also does anyone know if the "Curl transport" has sslVerifyPeer turned on by default or if it needs to be turned on. I know curl normally has sslVerifyPeer on by default.
I tried putting some example code, but the forum wouldn’t let me insert it because it had url calls.