Should Content-Type
& Accept
headers be normative when verifying or issuing credentials?
#290
Labels
ready for PR
Issue ready to be resolved via a Pull Request
Obviously the request to issue a credential should have the following headers (these come from the examples in the spec):
But nothing in the specification makes these headers normative. This means an issuer endpoint can accept requests with:
And that request could have a
json
request body.It also means an issuer can return a response with incorrect
Content-Type
headers such asContent-Type: text/plain
and then ajson
response body.Therefore I propose we make
Content-Type
andAccept
normative forPOST /credentials/issue
&
POST /credentials/verify
. The headers would need to match the type of the request or response body. In almost all cases those values would beapplication/json
orapplication/ld+json
. I'm not sure on theContent-Type
if an issuer accepts or returnscbor-ld
or possibly linked data inxml
formats, but for all cases in the current version of this specification it strongly appears we are expecting json of some form in the request body and possibly json in the response body too.The text was updated successfully, but these errors were encountered: