All jobs / Backend developer / API Development

Backend developer interview question · 0–1 years

The interviewer sketches /getOrder and /doDeleteUser. Strongest design?

The strongest answer

Model URLs as nouns — /orders/12 — and use the HTTP verb for the action. Don't put get or delete in the path.

Why it works

Exactly. REST's uniform interface is the verb plus a resource. /orders/12 + DELETE is cacheable, loggable and obvious.

What a good answer covers

Answers that fall short

Who gets asked this

More API Development questions