Difference between the servlet http post and put method?

This question already has an answer here:

  • PUT vs. POST in REST 32 answers

  • HttpServlet follow the HTTP specs as well which in simpler terms says:

    POST : To create a resource

    PUT : To modify a resource and if resource does not exist then create it

    HttpServlet provides an implementation of POST and PUT in doPost and doPut method.


    According to JavaDocs...

    HTTP POST method allows the client to send data of unlimited length to the Web server a single time and is useful when posting information such as credit card numbers.

    PUT operation allows a client to place a file on the server and is similar to sending a file by FTP.

    hope it helps.

    链接地址: http://www.djcxy.com/p/7014.html

    上一篇: 为什么使用PUT方法?

    下一篇: servlet http post和put方法之间的区别?