Add date format to If-Modified-Since documentation (#1196)
* Fix If-Modified-Since example in API.md Fixes the example curl request date format. It didn't conform to the IMF-fix standard and was not accepted by the parseDate function. Signed-off-by: Koen Tange <monokles@protonmail.ch> * Add If-Modified-Since format description to API.md Adds a short description elaborating on the different date formats supported by the If-Modified-Since header. Signed-off-by: Koen Tange <monokles@protonmail.ch> * Mark old time formats as obsolete in API.md Clarified in the text that only the IMF-fixformat date format should be used in conjuction with the If-Modified-Since header. Signed-off-by: Koen Tange <monokles@protonmail.ch>
This commit is contained in:
@@ -45,6 +45,13 @@ In any case a user doesn't have access to a requested entity, a 403 error will b
|
|||||||
### If-Modified-Since
|
### If-Modified-Since
|
||||||
|
|
||||||
Some index endpoints support limiting the result set to entries that have been changed since the given time.
|
Some index endpoints support limiting the result set to entries that have been changed since the given time.
|
||||||
|
The supported date formats are:
|
||||||
|
|
||||||
|
* IMF-fixdate: `Sun, 03 Aug 2019 10:34:12 GMT`
|
||||||
|
* (obsolete) RFC 850: `Sunday, 03-Aug-19 10:34:12 GMT`
|
||||||
|
* (obsolete) ANSI C asctime(): `Sun Aug 3 10:34:12 2019`
|
||||||
|
|
||||||
|
It is highly recommended to only use the IMF-fixdate format.
|
||||||
|
|
||||||
Example curl request:
|
Example curl request:
|
||||||
|
|
||||||
@@ -52,7 +59,7 @@ Example curl request:
|
|||||||
curl -u admin:admin -X GET \
|
curl -u admin:admin -X GET \
|
||||||
'http://localhost:8000/index.php/apps/deck/api/v1.0/boards/2/stacks' \
|
'http://localhost:8000/index.php/apps/deck/api/v1.0/boards/2/stacks' \
|
||||||
-H "OCS-APIRequest: true" \
|
-H "OCS-APIRequest: true" \
|
||||||
-H "If-Modified-Since: Mon, 5 Nov 2018 09:28:00 GMT"
|
-H "If-Modified-Since: Mon, 05 Nov 2018 09:28:00 GMT"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Endpoints
|
# Endpoints
|
||||||
|
|||||||
Reference in New Issue
Block a user