Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 699965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:26:41+00:00 2026-05-14T03:26:41+00:00

Is there anything non-RESTful about providing parameters to a HTTP DELETE request? My scenario

  • 0

Is there anything non-RESTful about providing parameters to a HTTP DELETE request?

My scenario is that I’m modelling the “Are you sure you want to delete that?” scenario. In some cases, the state of the resource suggests that the requested delete may be invalid. You can probably imagine some scenarios yourself where confirmation of a delete is required

The solution we have adopted is to pass a parameter to the delete request to indicate that it’s ok to proceed with the delete (“?force_delete=true”)

e.g.

DELETE http://server/resource/id?force_delete=true

I believe that it’s still restful since:

(a) The semantics of DELETE are not being changed – the user can still send a normal DELETE request but this may fail with 409 and the body of the response will explain why. I say may fail because (for reasons not worth explaining) on some occasions there is no reason to prompt the user.

(b) There’s nothing in Roy’s dissertation to suggest that it’s against the spirit of REST – why would there be since HTTP is only one implementation of REST so why would passing HTTP parameters matter

Can someone point me at a definitive statement that nails the reason why this isn’t RESTful?

On a related question, if the user does not specify force_delete then I’m returning 409 Conflict – is that the most appropriate response code?

Follow up

After some further research, I think that adding parameters to the DELETE may violate several principles.

The first is that the implementation possibly violates the “Uniform Interface” (see section 5.1.5 of Roy’s dissertation

By adding ‘force_delete’ we’re adding an additional constraint onto the already well defined DELETE method. This constraint is meaningful only to us.

You could also argue that it violate the “5.1.2 Client-Server” since the confirmation dialogue is really a UI concern and again not all clients will want to confirm deletion.

Suggestions anyone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:26:42+00:00Added an answer on May 14, 2026 at 3:26 am

    No, it is not RESTful. The only reason why you should be putting a verb (force_delete) into the URI is if you would need to overload GET/POST methods in an environment where PUT/DELETE methods are not available. Judging from your use of the DELETE method, this is not the case.

    HTTP error code 409/Conflict should be used for situations where there is a conflict which prevents the RESTful service to perform the operation, but there is still a chance that the user might be able to resolve the conflict himself. A pre-deletion confirmation (where there are no real conflicts which would prevent deletion) is not a conflict per se, as nothing prevents the API from performing the requested operation.

    As Alex said, this should be handled in the UI, because a RESTful service as such just processes requests and should be therefore stateless (i.e. it must not rely on confirmations by holding any server-side information about of a request).

    Two examples how to do this in UI would be to:

    • pre-HTML5:* show a JS confirmation dialog to the user, and send the request only if the user confirms it
    • HTML5:* use a form with action DELETE where the form would contain only "Confirm" and "Cancel" buttons ("Confirm" would be the submit button)

    (*) Please note that HTML versions prior to 5 do not support PUT and DELETE HTTP methods natively, however most modern browsers can do these two methods via AJAX calls. See this thread for details about cross-browser support.


    Update (based on additional investigation and discussions):

    The scenario where the service would require the force_delete=true flag to be present violates the uniform interface as defined in Roy Fielding’s dissertation. Also, as per HTTP RFC, the DELETE method may be overridden on the origin server (client), implying that this is not done on the target server (service).

    So once the service receives a DELETE request, it should process it without needing any additional confirmation (regardless if the service actually performs the operation).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anything in the header of an HTTP request that would allow me
Is there anything built into the core C# libraries that can give me an
Is there anything available that isn't trivially breakable?
Is there anything in Visual Studio that will report memory leaks like Codeguard? eg:
In <insert non-IE browser here> there is the <canvas> element that allows for doing
Is there anything which can help with msmq monitoring? I'd like to get some
Is there anything like ELMAH for Windows Forms? I'm looking for a standard way
Is there anything similar to getElementById in actionscript? I'm trying to make a prototype
Is there anything similar to an indexOf function in the NSString objects?
Is there anything built into Windows and the .Net framework for programmatically installing and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.