In RESTful web service, is OPTIONS method is supposed to be used to provide a list of available services? If yes, is that mandatory, or just a good programming practice.
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A response to an
OPTIONSrequest should provide some information about what the client can do with the resource in question. The most obvious example is to show which methods the resource will respond to, probably using anAllowheader. You could also respond with theAccept-Rangesheader to show when you support range requests.In practice, though, the
Allowheader is the only common use of theOPTIONSmethod, and even then implementation is far from universal. So it’s a nice feature to have, but isn’t likely to make a huge difference in a real world service.