0

I have a set of REST services that all follow same URL/verb pattern.
A few of those do not implement certain inessential combinations of URL/verb.

Since the application using those services does not know in advance which operations are implemented, it has to discover unimplemented ones dynamically.

I see two approaches:

  1. Sending 501 Not Implemented when the operation is requested
  2. Setting up OPTIONS support so that services can declare what they support

First approach seems better at the moment, since it is easier to implement, and requires one less request for the positive case (considering that OPTIONS are not cacheable).

Is there anything technically wrong with that approach?

4

1 回答 1

2

他们并不排斥对方。您应该同时实现两者。

于 2014-11-03T23:28:32.287 回答