NestJS · Senior · Question 49 of 75

How can one interceptor implement idempotency keys for POST endpoints?

Explanation

Store keys in Redis or the database with the request hash; handle concurrent requests with the same key via a lock.

Further reading

Problem with a question

NestJS · Senior · question 49

Test yourself

Take the NestJS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz