I have some resources stored in database. Based on data requested by client, server should retrieve the data from db and return to client. But here client can send some data(like some row ids) which makes sense to have in request body instead of header. Is it fine to use POST method where data can be part of request body?
Asked
Active
Viewed 20 times
0
-
Is there a reason you can't use query parameters? This is definitely a `GET` situation – Kai Jul 20 '17 at 03:23
-
Data in request can be too large to contain in query params. – Harsh Yadav Jul 20 '17 at 03:24
-
According to the HTTP spec, there's no maximum length to a query string -- how long are we talking? – Kai Jul 20 '17 at 03:25
-
Its not just about length of data, data should not be exposed also. – Harsh Yadav Jul 20 '17 at 03:27
-
This sounds like a design issue – Kai Jul 20 '17 at 03:33
-
I feel the same. – Harsh Yadav Jul 20 '17 at 03:42
-
Possible duplicate of [How can I deal with HTTP GET query string length limitations and still want to be RESTful?](https://stackoverflow.com/questions/4203686/how-can-i-deal-with-http-get-query-string-length-limitations-and-still-want-to-b) – Alexandru Marculescu Jul 20 '17 at 07:06