Implement support for If-Modified-Since in GET orderables/id

Description

The GET orderables/id should support If-Modified-Since HTTP header for all of the incoming requests. If the header is present, the request should only return a whole representation if the server modification date of the given orderable resource is later than the date provided in the If-Modified-Since request header https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
if the dates are the same or the version in request header is latter than the server version, the request will return response code 304 Not Modified and the response body will be empty. The Response header Last-Modified should contain the same value that the modified date field.

Acceptance criteria:

  • If-Modified-Since request header is supported in orderables/id endpoint but is optional

  • If the header is not provided, the endpoint returns the response as it used to

  • If the header is provided, the request returns a 200 response with the body only if the server version is latter by comparing the modification dates in the header and the modified date in server resource

  • If the header is provided, but the header version is the same or latter than the server version, the endpoint returns 304 Not Modified and doesn't attach the request body

  • Last-Modified header should always be present

 

Status

Assignee

Sebastian Brudziński

Reporter

Sebastian Brudziński

Labels

Story Points

3

Time tracking

16h

Epic Link

Components

Sprint

None

Fix versions

Priority

Major
Configure