Sunday, 18 August 2019

HTTPie: Download response or file in wget style


'http --download {url}' downloads the file in wget style.

$http --download http://localhost:8080/public/v1/guests/
HTTP/1.1 200 
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json;charset=UTF-8
Date: Fri, 02 Aug 2019 12:01:44 GMT
Expires: 0
Pragma: no-cache
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block

Downloading to "guests.json"
Done. 100.00 B in 0.00038s (257.77 kB/s)
$
$cat guests.json 
[{"id":1,"firstName":"Bikash","lastName":"Prakash"},{"id":6,"firstName":"rashika","lastName":"gun"}]



Previous                                                    Next                                                    Home

No comments:

Post a Comment