Skip to content

Version 1.2.0 URL encoding issue with req_url_path_append #780

@udurraniAtPresage

Description

@udurraniAtPresage

Thanks for the quality of life improvements in httr2 version 1.2.0. I see a change in the behaviour of req_url_path_append, and am not sure if that was intended. req_url_path_append returns different results in version 1.1.2 vs 1.2.0 :

library(httr2)

project_id <- "my-proj"

base_url <- "https://firestore.googleapis.com/v1beta1"

path_url <- paste0("projects/", project_id, "/databases/(default)/documents", ":runQuery")

httr2::request(base_url = base_url) |>
  httr2::req_url_path_append(path_url)

Result

# WITH httr2 version 1.1.2
<httr2_request>
  GET https://firestore.googleapis.com/v1beta1/projects/my-proj/databases/(default)/documents:runQuery
Body: empty


# WITH httr2 version 1.2.0
<httr2_request>
  GET https://firestore.googleapis.com/v1beta1/projects/my-proj/databases/%28default%29/documents%3ArunQuery
Body: empty

Is this a bug or expected behaviour?

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