-
Notifications
You must be signed in to change notification settings - Fork 3
WIP: Implement pagination headers #27
base: master
Are you sure you want to change the base?
Conversation
Yep, it really does! Also, check the Travis build, it's failing. |
0b58418
to
7addedc
Compare
7addedc
to
7526b7b
Compare
7526b7b
to
91a9363
Compare
Pull Request Test Coverage Report for Build 130
💛 - Coveralls |
tests/json.py
Outdated
response = client.get("/") | ||
assert response.status_code == 200 | ||
|
||
assert "X-Total-Count" in response.headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert "X-Total-Count" in response.headers | |
assert response.headers["X-Total-Count"] == 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need both tests then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. But then a similar test should be done in tests/app.py
, because we want the headers mode to work also with the non-json Stupeflask version.
4fdb4a2
to
719bc27
Compare
719bc27
to
3c992cf
Compare
3c992cf
to
00eb794
Compare
Concerning the current implementation, i tried to stick to the RFC linked by @tobes. Don't you think it's the best thing to do ? |
af1196e
to
8ba04d7
Compare
Don't we want the dict values in the body to only contain the links, without the |
9d544ef
to
f047dc9
Compare
PyMongo already handles that for the |
I think we should simply not offer the relatives links if we're on an edge. |
f047dc9
to
77f6e0d
Compare
b3091dc
to
f076ac7
Compare
Fixes #19 TODO: - Implement & test header Link for bare Flask app
f076ac7
to
81347d0
Compare
deca4d9
to
1690fda
Compare
Hi,
I PR this as apparently there is a need (@trubesv ).
At least we can discuss the implementation.