xh icon indicating copy to clipboard operation
xh copied to clipboard

Differences from HTTPie

Open ducaale opened this issue 2 years ago • 1 comments

  • --check-status is enabled by default unless xh is used in strict compatibility mode.
  • Rustls is used by default instead of the system's TLS library. (If enabled at compile time, the --native-tls flag can be used.)
  • JSON keys are not sorted.
  • Header names are not case-sensitive.
  • Header values are not decoded as ISO-8859-1. See https://github.com/ducaale/xh/issues/323
  • Formatted output is always UTF-8.
  • Leading dot is always removed from cookie domains. See https://github.com/SergioBenitez/cookie-rs/issues/73
  • .netrc supports bearer authentication. See https://github.com/ducaale/xh/pull/267

ducaale avatar Aug 16 '23 20:08 ducaale

Formatted output is always UTF-8.

What this means (IIRC) is that if:

  • The output is being redirected
  • The response is JSON
  • The response is latin1 (or some other non-UTF-8 encoding)
  • --pretty=format is passed

then HTTPie will turn the formatted JSON back into latin1, while we write it as UTF-8.

blyxxyz avatar Aug 16 '23 20:08 blyxxyz