by phoe-krk · 7y ago · 0 comments
> GET /?key=key&val=value
GET is supposed to have no side effects, according to RFC2616 9.1.1.
The "create a key-value pair" operation described here actually is idempotent.
The requirement on GET is that it must be safe, meaning no side-effects, for a variety of reasons, not just browser behaviour.
The difference is described in detail in RFC 7231 section 4.2, or the older RFC 2616 section 9.1.
The parent comment uses "safe" to mean doing it zero times is the same as doing it once or more. This is not a definition I've heard before, but maybe it's common in this context. A more normal term would be "free of side effects".
I'm no webdev, I think JS has been hyped so much around me I forgot plain html can actually do things...
When all API are GETs, the browser, which is likely to be open when you read this, is all you need.
An inline form on the webpage that POSTs the result is not a "webpage/separate tool". Option 2 would be to use the browser's dev console.
The dev console is a separate tool. And I'm still sure it is much quicker and easier to open a new tab and type in an URL, than to do a POST with dev console.
And your service is also incorrect due to the issues with side-effects mentioned elsewhere in the thread.
Multiple existing and established services were created as proofs-of-concept, silly jokes, experiments, and other "non-serious use" projects. Many of them have survived and we are forced to bear with their sloppy design all the time.
Have you ever used e.g. JavaScript?