I am using curl and it is working fine in local..but returning
Invalid response line returned from server: HTTP/2 200
in live server.
I referred this link
How to add preference or plugin to overwrite parseHeaders function in vendor/magento/framework/HTTP/Client/Curl.php