practical-api-guidelines icon indicating copy to clipboard operation
practical-api-guidelines copied to clipboard

Query String Parameters on a POST Request

Open CarloGarcia opened this issue 4 years ago • 4 comments

Would anyone ever do this? Should this be a "DO NOT" rule, or are there valid situations where this could be allowed.

CarloGarcia avatar May 13 '21 13:05 CarloGarcia

I haven't see the need for this, personally.

tomkerkhove avatar May 13 '21 13:05 tomkerkhove

Hi @CarloGarcia yes indeed I agree with you. This should be a DO NOT rule. POST always should have a defined object contract on message payload and nothing by query string 😎

gfchaves avatar May 31 '21 15:05 gfchaves

Only exception I can see is if people need to do API versioning using the query string, but best avoided indeed. For example: https://{myconfig}.azconfig.io/kv?api-version=1.0

CarloGarcia avatar Jun 01 '21 14:06 CarloGarcia

even with that IMHO shoud be: https://{myconfig}.azconfig.io/v1/kv and not as a query parameter.

gfchaves avatar Jun 02 '21 09:06 gfchaves