3 ms·
> Also, pretty often you need multiple IDs of entities to send POST/PUT request - just to create a relation. > How should it look with links? Like this: POST
by frosted-flakes 7y ago
> Also, pretty often you need multiple IDs of entities to send POST/PUT request - just to create a relation.
> How should it look with links?
Like this:
POST /adoption, owner=/people/5, dog=/pets/7
> Will it be issue for the server to parse them?
Why would it be?
- EugeneOZ 7y agoBecause it's more difficult than parse "5" and "7", especially when you need to parse not only numeral IDs. "More difficult" always means "more bugs" and "more vulnerabilities". There is no single reason for this complication. The ONLY motivation author had - less knowledge about API endpoints on the client. But simultaneously it means more knowledge about the fields where links are stored, so it doesn't save nothing.
- imtringued 7y agoI believe "so it doesn't save nothing." should be written as "so it doesn't save anything." [0] Feel free to ignore me. [0] https://www.quora.com/Is-the-sentence-dont-do-nothing-correct https://www.quora.com/Is-the-sentence-dont-do-nothing-correc...
- EugeneOZ 7y agothanks :)