Skip to content

Support for headers: Accept and If-Modified-Since #15

@juztas

Description

@juztas

While reviewing OpenAPI Spec (https://github.com/doe-iri/iri-facility-api-docs/blob/main/specification/openapi/openapi_iri_facility_api_v1.yaml#L154-L169) I noticed that python implementation does not implement (nor expose in OpenAPI.json) any of the headers (Accept and If-Modified-Since).

  • Accept - application/json. Easy to add;
  • If-Modified-Since (header) and modified_since (query parameter). This allows client to specify one or both. What is the correct precedence rule if both are specified? I think we need to define it explicitly in the API Spec the expected behavior and implement it inside the API. Something like:
If both the If-Modified-Since header and the modified_since query parameter are provided, the modified_since query parameter takes priority.

or

Use the most recent timestamp between the If-Modified-Since header and the modified_since query parameter — whichever is later takes precedence.

@jmacauley

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions