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

curl_translate() bugs #500

Open
mgirlich opened this issue Jul 12, 2024 · 0 comments
Open

curl_translate() bugs #500

mgirlich opened this issue Jul 12, 2024 · 0 comments
Labels
bug an unexpected problem or unintended behavior curl-translate 🌍

Comments

@mgirlich
Copy link
Collaborator

A couple of bugs I found when creating the PR for curlconverter.com

Crashes

library(httr2)
curl_translate("curl -X GET \"http://localhost:28139/cookies\" -H \"accept: application/json\" -H 'Cookie: mysamplecookie=someValue; emptycookie=; otherCookie=2'")
#> Error in `httr2::url_parse()`:
#> ! `url` must be a single string, not a character vector.

Wrong url

curl_translate("curl httpbin.org")
#> request("/httpbin.org") |> 
#>   req_perform()

Missing headers:

curl_translate("curl --header \"Content-Type: text/xml;charset=UTF-8\" --header \"getWorkOrderCancel;\" localhost:28139/get")
#> request("localhost:///28139/get") |> 
#>   req_perform()

Created on 2024-07-12 with reprex v2.1.0

@hadley hadley added bug an unexpected problem or unintended behavior curl-translate 🌍 labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior curl-translate 🌍
Projects
None yet
Development

No branches or pull requests

2 participants