All jobs / Backend developer / API Development

Backend developer interview question · 0–1 years

The interviewer asks: “Which HTTP methods are safe to retry, and why?” Strongest answer?

The strongest answer

GET, HEAD, PUT and DELETE should be idempotent: repeating the same request does not create extra side effects. POST usually is not — retrying it can create a second order.

Why it works

Exactly. Idempotent means the effect of N identical calls is the same as one. That's why timeouts on GET/PUT are retryable and a raw POST needs an idempotency key.

What a good answer covers

Answers that fall short

Who gets asked this

More API Development questions