A servlet needs to handle a file upload from a web form. Which HTTP method and content type should be used?

  • DELETE with text/plain
  • GET with application/x-www-form-urlencoded
  • POST with multipart/form-data
  • PUT with application/json
For handling file uploads, the appropriate combination is to use the POST method along with the multipart/form-data content type.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *