Solved

Why are 'PUT' and 'DELETE' considered idempotent?

Posted on 2015-01-24
6
104 Views
Last Modified: 2015-01-29
Why are 'PUT' and 'DELETE' considered idempotent?
0
Comment
Question by:KPax
  • 3
  • 3
6 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40568028
To quote this page http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods_and_web_applications
PUT and DELETE are defined to be idempotent, meaning that multiple identical requests should have the same effect as a single request
0
 

Author Comment

by:KPax
ID: 40568032
I know how to use wikipedia, thank you.
How comes that would be the true?
If you have resource on server and DELETE it you will get 200 or 202, then the next DELETE wouldn't have same effect as you already deleted resource and you will get 404. And what if I PUT some resource on server that irreversibly changes/affect state of some other component (DB record maybie)?
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 40568324
In theory, only POST method is supposed to be used to change something like a database record.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Assisted Solution

by:KPax
KPax earned 0 total points
ID: 40568404
So, would you agree that in practice PUT and DELETE might not be idempotent all of the time? Depending on circumstances of  course - programmers error, intention, inexperience etc?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40568499
Yes, I agree... except I never use that word, 'idempotent'.  It doesn't describe any of the things you mention.  I don't have any hosting that uses PUT and DELETE.  At least not that I know of.
0
 

Author Closing Comment

by:KPax
ID: 40577052
Additional thought and clarification from me regarding question.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question