w3c-ccg / traceability-interop

Verifiable Credentials for Supply Chain Interoperability Specification for HTTP
https://w3id.org/traceability/interoperability
Other
26 stars 10 forks source link

Require accept header #609

Closed rhofvendahl closed 10 months ago

rhofvendahl commented 10 months ago

Do we want VC API implementations to require Accept headers in "create credential" requests, returning 400 status if the header isn't present? If yes, we'll want to update the spec with normative language and approve https://github.com/w3c-ccg/traceability-interop/pull/606, which would add negative testing for this.

brownoxford commented 10 months ago

Another alternative is to NOT require an Accept header, and return application/vc+ld+json by default.

rhofvendahl commented 10 months ago

It was decided on today's trace call that it does not make sense to return an error if a request Accept header is missing. An error should be returned if a media-type requested by the client is not available, but if the header is absent then the server should just return the default value.