Should I POST to the collection when creating a resource with a known ID in my REST API? -


i'm implementing new rest api. in api typically post collections create resources. 1 of resources, id known before created. make more sense post collection id in body or post instance (as yet non-existent) id in url?

i'd keep existing endpoint , add id in body when posting collection, there's no point in adding new separate route what's same thing.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -