curl-converter
curl-converter copied to clipboard
-c, --cookie-jar <filename> not supported
I have just tested the new genius feature to convert cURL call to Laravel HTTP request and faced with the issue, the "-c" option does not exist. This is the cookie file handling feature of the cURL function.
Example cURL call:
curl -v -F [email protected] -c ./cookies.txt -o response.pdf https://www.szamlazz.hu/szamla/
Reference: https://docs.szamlazz.hu/#post-request
This option is not currently converted. It also doesn't appear Laravel's Http client directly supports it.
However, I am sure the underlying Guzzle client does. So I'll take a look in the coming week. In the meantime, you could drop this option and convert the curl command. Then add the cookie part after.
The only way I know at the moment to easily put cookies from an external source (without having to iterate over them and create them manually) into the Http client is by:
Http::withOptions(
[
'cookies' => <cookieJarInterface>,
])