Results 1 to 6 of 6
  1.    #1  
    Has anyone ever been able to get an actual HTTP PUT to work? I know you can type PUT for "Method" when using Ajax.Request, but if you use Wireshark to watch the traffic, you'll see that it gets converted to a POST.

    I've played with XMLHttpRequest, but I can't find very documentation for it, and can't get it to show up as a PUT when I set the PUT option.

    Thanks!

    David
  2. #2  
    It seems that it isn't mandatory for implementations of XMLHttpRequest to implement the PUT method so maybe it just converts it to a POST request automatically.

    Also someone over at stackoverflow had this useful nugget:

    HTML forms (up to HTML version 4 and XHTML 1) only support GET and POST as HTTP request methods. A workaround for this is to tunnel other methods through POST by using a hidden form field which is read by the server and the request dispatched accordingly. XHTML 2.0 will support GET, POST, PUT and DELETE from forms.
    So maybe the POST contains a hidden field with the PUT data contained in it that the server can see (provided it has the correct PUT support).

    Hope that helps.
  3. #3  
    HTTP PUT is almost never used anymore. It was a bad design in the first place and most secure web servers flat out block it. So the alternative is to use HTTP POST (which in most cases gives you what you need without the dangerous components) and a lot of systems do convert PUT to POST as a way to keep bad programmers from causing problems. Why PUT is even still supported is beyond me.
  4.    #4  
    Actually PUT and DELETE are major components in RESTful APIs and still widely used. More information on RESTful: Representational State Transfer - Wikipedia, the free encyclopedia

    David
  5. #5  
    Is there anything you can do with PUT that you can't do with POST? Or is this more a personal preference?

    I've always been aware of PUT but haven't needed to use it yet.
  6. #6  
    Palm is aware. It is a limitation of the Prototype library version they're using. They've said they plan on bringing in PUT and DELETE in the future.
    Arthur Thornton

    Former webOS DevRel Engineer at Palm, HP, and LG
    Former webOS app developer (built Voice Memos, Sparrow, and several homebrew apps and patches)
    Former blogger for webOS Nation and webOS Roundup

Posting Permissions