News for hackers. Stuff that matters.
Re:An Introduction to APIs by sibit on Sunday July 30, 2023 @01:00PM (#36933282)
Interesting. I guess I've been going off of RFC 7231

> The PUT method requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

https://www.ietf.org/rfc/rfc7231.txt

Re:An Introduction to APIs by blowski on Sunday July 30, 2023 @01:25PM (#36933606)
My rule of thumb: if you know the ID of the resource you’re creating, it’s a PUT. If the system generates the ID, then it’s a POST.
Re:An Introduction to APIs by treve on Sunday July 30, 2023 @05:48PM (#36936361)
More generally the URI instead of the ID.
Re:An Introduction to APIs by SgtBastard on Sunday July 30, 2023 @08:54PM (#36937739)
The I in URI, stands for Identifier...