Curl for file download via POST
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
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):
curl
add a comment |Â
up vote
0
down vote
favorite
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):
curl
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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):
curl
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):
curl
curl
edited Mar 21 at 0:19
asked Mar 21 at 0:03
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
kUser
11
11
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Newbie mistake. It works with the -o option:
-o "outputfile.txt"
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Newbie mistake. It works with the -o option:
-o "outputfile.txt"
add a comment |Â
up vote
0
down vote
Newbie mistake. It works with the -o option:
-o "outputfile.txt"
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Newbie mistake. It works with the -o option:
-o "outputfile.txt"
Newbie mistake. It works with the -o option:
-o "outputfile.txt"
answered Mar 21 at 1:09
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg?sz=32)
kUser
11
11
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017773%2fcurl-for-file-download-via-post%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password