Skip to content

curl_translate() does not respect multi line queries #161

@mgirlich

Description

@mgirlich

Using chrome to get the curl command for a request one gets a multi line request, e.g.

curl 'https://community.rstudio.com/' \
  -H 'authority: community.rstudio.com' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  --compressed

Unfortunately, curl_translate() does not handle this correctly

httr2::curl_translate(r"{curl 'https://community.rstudio.com/' \
  -H 'authority: community.rstudio.com' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  --compressed}")
#> request("https://community.rstudio.com/") %>% 
#>   req_perform()
#>  request("\") %>% 
#>   req_perform()

Created on 2022-07-27 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions