Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-c, --cookie-jar <filename> not supported #17

Open
trianity opened this issue Oct 13, 2022 · 2 comments
Open

-c, --cookie-jar <filename> not supported #17

trianity opened this issue Oct 13, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@trianity
Copy link

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 action-xmlagentxmlfile=@agent.xml -c ./cookies.txt -o response.pdf https://www.szamlazz.hu/szamla/

Reference:
https://docs.szamlazz.hu/#post-request

@jasonmccreary
Copy link
Collaborator

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.

@jasonmccreary jasonmccreary added the enhancement New feature or request label Oct 13, 2022
@jonnywilliamson
Copy link

jonnywilliamson commented Oct 13, 2022

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>,
])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants