Skip to content

Support content negotiation via Accept header #3

@francescobianco

Description

@francescobianco

Description

The API already supports content negotiation through the Accept HTTP header, but this capability is currently undocumented.

When one of the following media types is specified, the default response format (application/json) is overridden and the output is returned accordingly:

Accept Header Output Format
application/vnd.toon+text Toon
text/markdown Markdown
application/xml XML
application/json JSON (default)

Example

GET /api/resource
Accept: text/markdown

The response will be returned in Markdown format instead of JSON.

Proposed Action

  • Document supported Accept header values.
  • Add examples to the API documentation.
  • Clarify that application/json remains the default response format when no supported Accept header is provided.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions