Is it possible to download a file with HTTP POST?

前端 未结 6 995
-上瘾入骨i
-上瘾入骨i 2020-12-15 16:37

Is it possible to download a file with HTTP POST? I know the \"Get\" way(windows.location), but in my case, there are a lot of param that should be passed to server

6条回答
  •  感动是毒
    2020-12-15 17:12

    Yes, the rest of a POST request can direct a browser to download a file. The file contents would be sent as the HTTP response, same as in the GET case.

提交回复
热议问题