3 ms·
Following your examples, one of the ways of searching is by issuing a GET to /search?params. The problem with this, is that is easily to reach the maximum size
by cientifico 13y ago
Following your examples, one of the ways of searching is by issuing a GET to /search?params.
The problem with this, is that is easily to reach the maximum size of the url. For example, if you want to know the data of your facebook frriends you will issue a GET /data?user[:fb_id]=123&user[:fb_id]=534...
There is a solution for this less ugly than using POST, is to sent data in the GET request. This is not forbidden by any RFC. Is just not so common. Most of the client libraries supports that.
- icebraining 13y agoWhy not: > POST /search > #query data < 201 CREATED < Location: /search/2324242 > GET /search/2324242 < 200 OK > GET /search/2324242?page=2 < 200 OK (hopefully the representation would be an implementation of a standard paged format, like RFC 5005, but I'm not holding my breath)
- cientifico 13y agoBecause if you are not changing nothing on the server, you should not use POST requests.