Skip to content

Check for content types accepted by client #81

@uniqueg

Description

@uniqueg

API endpoints can serve different content types, e.g., application/json, text/plain etc. Clients can ask a service to respond with one or more specific accepted content types.

It would be nice if FOCA implemented a solution (e.g., a decorator) that compares the client's desired content type(s) against the ones that the service offers for the respective endpoint (as defined in the API specs). An appropriate error response should be returned if a client requests a content type that the endpoint cannot deliver. If the client does not explicitly ask for a specific content type (i.e., if the Accept: <content-type> header is missing), the default response should be given.

Other important points to think about:

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo other

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions