Dick Dowdell
Oct 16, 2022

--

Georgios, a GET should never have a payload. Are we discussing the same topic?

POST, PUT, and PATCH have a body (payload). An HTTP GET has a URI and an optional HTTP query string. No body.

And no, I do not think a QUERY method is a good idea. It would be a data security disaster. If you don’t know why, lookup “SQL injection”. It is a bad idea to build services that that take in raw SQL as input. The Internet is a dangerous place.

This is a safe way to influence SQL selection using an HTTP request (https://medium.com/nerd-for-tech/designing-a-rest-api-3a070398750f#6e4c). It does let one modify query parameters without risking a SQL injection attack, but it does not support the more powerful SQL features like joins.

--

--

Dick Dowdell
Dick Dowdell

Written by Dick Dowdell

A former US Army officer with a wonderful wife and family, I’m a software architect and engineer who has been building software systems for 50 years.

Responses (1)