×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    30

    Sending HTTP Delete. Is it possible?

    Hi All,

    I'm trying to send an HTTP DELETE through the XMLHttpRequest object. While it works with 'POST' and 'GET' it seems that 'DELETE' is not supported, since the 'DELETE' is replaced with a 'GET' once the request is sent. Does anybody know if WRT supports HTTP DELETE method?
    I have read the post http://discussion.forum.nokia.com/fo...d.php?t=131851 that suggests that the support for different HTPP methods is limited.

    Thanks in advance

    /J

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Sending HTTP Delete. Is it possible?

    I can confirm that 'DELETE' doesn't seem to work, getting replaced by 'GET' request method.

    Pit

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    19

    Re: Sending HTTP Delete. Is it possible?

    Isn't DELETE essential for a lot of RESTful APIs? (along with POST, GET and PUT). Would be good to see this implemented sometime in the near future.
    Last edited by WebSeed; 2008-11-10 at 12:34.

  4. #4
    Registered User
    Join Date
    Aug 2006
    Posts
    17

    Re: Sending HTTP Delete. Is it possible?

    Did you tried using jQuery.ajax ?
    You can find documentation here: http://docs.jquery.com/Ajax/jQuery.ajax#options

    I've never tried but, WRT uses webkit as engine, so it might be possible.

    []s
    Neto

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Sending HTTP Delete. Is it possible?

    Hi Neto,

    I've not tested jQuery Ajax library, but it seems that the problem here lies not in code, but into XMLHttpRequest implementation and management of different methods. As reported on this thread, DELETE seems to be always replaced by GET once the request is sent.

    Pit

  6. #6
    Registered User
    Join Date
    Nov 2003
    Posts
    30

    Re: Sending HTTP Delete. Is it possible?

    HI
    i also think that the problem is in the underliying XMLHttpRequest implementation (as jappit says). All my tests confirm that any attempt to make a DELETE is replaced (probably by the WRT framework?) by a GET. In the same way that any propietary header added to the request is removed when it is sent.


    Thanks anyway.

    /J

  7. #7
    Registered User
    Join Date
    Apr 2008
    Posts
    3

    Re: Sending HTTP Delete. Is it possible?

    Prototype mimics DELETE by sending an additional parameter with the request (will be sent as POST really, as DELETE is not possible via XHR), which at least by Rails is interpreted correctly.

    This enables using OpenSocial etc RESTful APIs..

Similar Threads

  1. Replies: 22
    Last Post: 2009-07-01, 13:44
  2. HTTP to SMS question
    By tacchan666 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-05-10, 10:22
  3. Replies: 2
    Last Post: 2006-10-06, 17:24
  4. problem in sending http request with chinese text
    By terrible123 in forum Mobile Java General
    Replies: 0
    Last Post: 2003-03-03, 07:37
  5. Creating and Delete databases
    By -kevbo- in forum Symbian
    Replies: 1
    Last Post: 2001-12-13, 12:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×