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

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

javascript - Understanding ExtJS Framework Syntax -