Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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?



Because 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.


I 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-correc...


thanks :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: