Curl for file download via POST

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








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):









share|improve this question



























    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):









    share|improve this question

























      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):









      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 21 at 0:19

























      asked Mar 21 at 0:03









      kUser

      11




      11




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













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






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            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






























            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"






            share|improve this answer
























              up vote
              0
              down vote













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






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









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






                share|improve this answer












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







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 21 at 1:09









                kUser

                11




                11



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    Which professions warranted travel in Medieval times?

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error