Skip to content

Rethink binary detection in body #91

Description

@hadley

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    body 🕺featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions