cli icon indicating copy to clipboard operation
cli copied to clipboard

`http -v` should show escaped Unicode as-is

Open wataash opened this issue 3 years ago • 0 comments

In the two commands below, both shows the same JSON.

$ http -v httpbin.org/post a:='"あ"'
...
{
    "a": "あ"
}
...

$ echo '{"a": "あ"}' | http -v httpbin.org/post
...
{
    "a": "あ"
}
...

But actually they send different data:

image image

In the first command, I expect it to show \u3042, but it seems parse the escaped Unicode and show the parsed letter .

i.e. it should output:

$ http -v httpbin.org/post a:='"あ"'
...
{
    "a": "\u3042"
}
...

$ echo '{"a": "あ"}' | http -v httpbin.org/post
...
{
    "a": "あ"
}
...

See also https://github.com/httpie/httpie/issues/814.

wataash avatar Jan 21 '23 07:01 wataash