Given a REST api. I want to learn what media types I can set in the Accept header. How should I this?
I know I could do a random
GET http://some.api.com/
Accept:flying/elephants
and hope for a 406 with a body that has the correct acceptable media types.
Is there a better way?
In theory, API could indicate supported Content Types via
HTTP OPTIONSUsually, API offers either
Accept-header values.Also (as you might know),
Accept-header values are usually bound to IANA defined MIME types