From bf1a917e2b1e2567976f80d4f0bfa610c0330a7f Mon Sep 17 00:00:00 2001 From: Koen Date: Mon, 26 Aug 2019 17:18:32 +0200 Subject: [PATCH] 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 * 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 * 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 --- docs/API.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index b3f4384e2..65b0bfc44 100644 --- a/docs/API.md +++ b/docs/API.md @@ -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 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: @@ -52,7 +59,7 @@ Example curl request: curl -u admin:admin -X GET \ 'http://localhost:8000/index.php/apps/deck/api/v1.0/boards/2/stacks' \ -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