I have a problem in solving a question 2 of Java beat mock simulator.
------------------------------------------------------------------------ 2. You need to send large amount of binary data from the browser to a servlet to be processed. (Say, you want to attach a file while sending email through a web based system). What HTTP method would you use? Select 1 correct option. A.GET B.POST C.HEAD D.HIDDEN E.PUT ------------------------------------------------------------------------- Correct answer given is B. whereas I think answer is E Reason:- I could get this statement from Mikalai's note that "The PUT operation allows a client to place a file on the server and is similar to sending a file by FTP." and as data in this case is "large amount of binary data". I think E is better option than B.
I think you are wrong. PUT overwrites target url with the content you send. The question clearly specifies that the servlet needs to process the content. So the content is POSTed.