Welcome to my weblog. I write to help find my perspective, to reflect, and to give me a chance to see my ideas from different angles. Sometimes I vent. Sometimes I’m processing. Sometimes I just want to be helpful.
HTTP, GET, and fuzzy semantics
A developer asked me a seemingly obvious question today: I have an API GET request that requires a JSON body. Is that okay? It’s a good question too. It turns out the answer isn’t as simple as it should be. On principle the answer is, “No, it’s not cool”. A GET is an idempotent request for a resource. You don’t request a resource with a resource (what would that mean?), you request it with a resource identifier. The HTTP spec, however, is unclear on the subject and does not explicitly disallow it (it probably should). ...