One of the RESTful rule is to properly utilize HTTP methods: Get, Post, Put, Delete. Where Get is used for retrieving data from server; Post or Put is for creating or updating object.
Once a while I ran into a problem where I need to run a query with a long complex filter expression (or criteria). It is very difficult to describe the entire filter express in URI query string. Even worse, the length of that filter is exceed 20XX character, My point is, it is very loooong.
I cannot instead just send the filter expression in HTTP message body, if I want to be a good REST citizen by utilizing GET HTTP method for this query request.
Once a while I ran into a problem where I need to run a query with a long complex filter expression (or criteria). It is very difficult to describe the entire filter express in URI query string. Even worse, the length of that filter is exceed 20XX character, My point is, it is very loooong.
I cannot instead just send the filter expression in HTTP message body, if I want to be a good REST citizen by utilizing GET HTTP method for this query request.
![Picture](/uploads/3/0/8/5/30851839/6025849.png?129)
So I have to use either Post or Put method in order send the filter in message body.
Some cool kids suggest me to revise my query again, try to split it into smaller, simple until.
That's sound like a good idea, but I don't want to run multiple requests and then aggregate result at client.
Please help me share your experience on how you used to solved this kind of problem.
Some cool kids suggest me to revise my query again, try to split it into smaller, simple until.
That's sound like a good idea, but I don't want to run multiple requests and then aggregate result at client.
Please help me share your experience on how you used to solved this kind of problem.
![Picture](/uploads/3/0/8/5/30851839/4194496.png?90)
I am sure RESTful police is looking to capture me, because I violate this rule.