HTTP options method



in my API project I want to use the options http method. Could I have any informations about its implementation with JSON API rules?

I believe that in the specifications the options http method is not mentioned.

Thanks in advance for the answers.



There’s no specific integration with JSON API’s rules. You just support it as normal.

Was there anything in particular you were thinking of?


I would use the Options HTTP Method to (synthetically) document my REST endpoints. For instance, for one endpoint, what parameters are available, what are mandatory, etc. I would like that an user would be able to use my REST service only by reading the output of the Options HTTP Method.
I hope I have explained well my issue. :grin:


Sure, then just do it all as normal. Nothing special here.


Thanks for the answer. :wink:


Only thing I’d add here: If you implement options, make sure that that endpoint returns standard application/json rather than application/vnd.api+json. That way, if JSON API defines OPTIONS semantics in the future, your server won’t be in conflict with them.