When no explicit Accept header nor any json payload (e.g., foo=bar, quz=42) are specified in the request, the following is a difference in handling wrt httpie:
$ curlie -v get http://example.net
* ...
GET / HTTP/1.1
Host: example.net
User-Agent: curl/7.64.1
Accept: application/json, */*
HTTP/1.1 200 OK
...
That is, curlie includes and gives preference to application/json in the Accept header in these cases. In contrast, httpie simply includes Accept: */*, which seems more flexible in general:
$ http -v get http://example.net
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: example.net
User-Agent: HTTPie/3.2.1
...
fwiw, CURL itself also just includes Accept: */*:
➜ ~ curl -v http://example.net
* Trying 2606:2800:220:1:248:1893:25c8:1946...
* TCP_NODELAY set
* Connected to example.net (2606:2800:220:1:248:1893:25c8:1946) port 80 (#0)
> GET / HTTP/1.1
> Host: example.net
> User-Agent: curl/7.64.1
> Accept: */*
>
...
When no explicit Accept header nor any json payload (e.g.,
foo=bar, quz=42
) are specified in the request, the following is a difference in handling wrt httpie:That is, curlie includes and gives preference to application/json in the Accept header in these cases. In contrast, httpie simply includes
Accept: */*
, which seems more flexible in general:fwiw, CURL itself also just includes
Accept: */*
: