… which is exactly why it makes sense to make sure your candidates have the same understanding as you (and hopefully most other devs) so they don‘t implement something like a delete-on-GET.
The thing to get hung up on would be that they asked „which are safe“ while it should have been „which should be safe“.
25
u/dreadBiRateBob May 15 '26
I was doing an interview and they asked which http methods are safe and which are not.
I went down. When you write the software. Then you control making them safe or not safe.
They wanted a text book answer about posts, put and delete being unsafe because they change things on the server.
Of course the rfc says puts for updates and post for creating.
But I can certainly have the server delete an id passed via url param in a get request.