-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Description
Description
Currently, CurlHttpClient
has a set of allowed options that can be passed on construction and then they're converted to curl opts internally.
However, the CURLOPT_FORBID_REUSE
is not mapped to any option and therefore it's impossible to use when relying on PSR interfaces.
Symfony request()
method allows to pass options through 3rd arg via extra.curl
but I don't want to use that option nor interface as it exposes implementation details.
I'm making http requests to devices that has unreliably implemented HTTP. Therefore it is required to force TCP connection to close in order to enforce some stability. And that's done using CURLOPT_FORBID_REUSE
.
Example
Would it make sense to add forbid_reuse: true|false
option that can be passed into new CurlHttpClient(['forbid_reuse': false])
? I don't see any other way to do so.