1

I use curl to send POST data, and expect to get a zip file back. The curl POST command seems to execute Ok, and I can see that the server tries to send the zip file (dataset.zip) as an attachment, but I don't know how to get it. Am I missing a curl option? Please help! This is the command + output:

curl -ksb "COOKIE.txt" --request POST -d params="${params}" -v "https://MYSERVER.com/downloadDatasetsByParams"
HTTP/1.1 200 OK
Date: Tue, 20 Mar 2018 23:35:13 GMT
Server Apache-Coyote/1.1 is not blacklisted
Server: Apache-Coyote/1.1
content-disposition: attachment; filename=dataset.zip
Content-Type: application/x-download
Set-Cookie: X_Email=kUser@mserver.com
Transfer-Encoding: chunked
Failed writing body (0 != 4096)
Failed writing data
Marked for [closure]: Transfer returned error
multi_done
stopped the pause stream!
Closing connection 0
The cache now contains 0 members
TLSv1.2 (OUT), TLS alert, Client hello (1):
0

Newbie mistake. It works with the -o option: -o "outputfile.txt"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.