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

Rethink binary detection in body #91

Open
hadley opened this issue Oct 6, 2021 · 0 comments · May be fixed by #427
Open

Rethink binary detection in body #91

hadley opened this issue Oct 6, 2021 · 0 comments · May be fixed by #427
Labels
body 🕺 feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Oct 6, 2021

So easier to see UTF-8 text:

library(httr2)

request("http://example.com") %>%
  req_body_json(list(x = "Cenário 1")) %>%
  req_dry_run()
#> POST / HTTP/1.1
#> Host: example.com
#> User-Agent: httr2/0.0.0.9000 r-curl/4.3.2 libcurl/7.64.1
#> Accept: */*
#> Accept-Encoding: deflate, gzip
#> Content-Type: application/json
#> Content-Length: 18
#> 
#> 18 bytes of binary data

Created on 2021-10-06 by the reprex package (v2.0.1)

@hadley hadley added feature a feature request or enhancement body 🕺 labels Apr 26, 2022
hadley added a commit that referenced this issue Jan 16, 2024
Initial implementation improves handling in `req_dry_run()`. For `req_verbose()` we'd need to ensure that the output isn't compresed by overriding the `Accept-Encoding` header, and think more carefully about where we store the data since the enclosing environment might apply to multiple requests.

Fixes #91
@hadley hadley linked a pull request Jan 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
body 🕺 feature a feature request or enhancement
Projects
None yet
1 participant