Reference on how to implement idempotent rest api in asp.net core web api

Alvin 1 Reputation point
2021-12-09T22:28:55.143+00:00

Hi All,

I know that is too large topic, but I just want to ask any reference of that said pattern idempotent.

All reply must be appreciated

Developer technologies ASP.NET ASP.NET Core
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-12-10T16:17:57.067+00:00

    The main design of your api is that put is used to update and posts are used to add data.

    Also be careful of how puts work. Calling the same request twice should not change state. This means the server should not do something like increment a counter, or if it does detect it already been done.

    For example, in a shopping bag, changing the unit count, you either want the total passed, or include a unique reference number used to detect the count has been updated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.