• Post Reply Bookmark Topic Watch Topic
  • New Topic

Http methods

 
Sandip Bose
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An image file has to be uploaded to the server.
Which of the HTTP methods can be used in this situation?

either doPost() or doPut() and why?
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both of them can be used...

just that you'll have to include 'ENCTYPE = "multipart/form-data"' in your form declaration.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only methods supported by HTML are GET and POST, so PUT can not be used.
 
Sandip Bose
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am very much confused which is correct???
 
Sandip Bose
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
click here...please check this..what i found
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, I was assuming that you were talking about a situation where the client is a web browser handling HTML (in which case PUT is not an option). (And it looks like Dawn was assuming the same thing, talking about a "form declaration".)

PUT can be used for this in other contexts that use HTTP (like a WebDAV client).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!