Reputation: 8798
Sometimes it may need query data which can exceed GET length limit so I am considering to use POST. Query does change anything, just returns data according to the parameters.
I am using GET for link with token which is sent as email for user. It changes state so GET is not suitable but more convenient to use.
Is it good practice to use these solutions?
Upvotes: 0
Views: 880
Reputation: 636
GET http://host/customer?country=UK&name=foo
you could represent this as GET http://host/country/UK/customers/foo
.So, in both cases I would say this is bad practice, but (1) is allowable provided you genuinely cannot overcome the querystring limit some other way.
Source: RFC2616 - section 9: Method definitions
Upvotes: 1