-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For ViewQuery.keys(), use GET instead of POST #165
Comments
method private T executeQuery(final ViewQuery query, ResponseCallback rh) |
Please merge pull request #170 |
Introduce query executor strategy, enabling #165
Now that #174 is merged, you should be able to create you own implementation of a QueryExecutor to be injected into the StdCouchDbConnector. |
from the discussion in helun#165, which prefers `GET` HTTP method even in case of multiple keys. It is more appropriate for hosted services like <a href="http://cloudant.com/">Cloudant</a> where `POST` requests are charged more than `GET`. However, if the HTTP request length exceeds `MAX_KEYS_LENGTH_FOR_GET` characters, it will use `POST` HTTP method. `ViewQuery` needed to be factored slightly to support its usage.
@YannRobert @helun 1.4.2 changes are not sufficient to implement my own Please review #192 for the additional changes required. |
Currently Ektorp uses
POST
to get aViewQuery
that has specifiedkeys()
:While it works, services like Cloudant charges POST requests 5 times more expensive than GET requests.
Ektorp should default to GET requests unless it's really necessary to use POST? (maybe when the GET URI is close to 8 KB)
The text was updated successfully, but these errors were encountered: