Which HTTP method to use for file downloading?
问题 In my site users can download their files. But files are generated by using PHP. So what's HTTP method should I use for sending request for download as file attachment? GET or POST? 回答1: GET is for passively retrieving files, POST is for altering information on the server. This is as seen from the client, it doesn't matter what the server does or doesn't do in the process. So unless you're altering some server state in the request: GET. 回答2: GET From http://en.wikipedia.org/wiki/Hypertext