RESTful API methods; HEAD & OPTIONS

Viewed 156970

I'm writing a RESTful API module for an application in PHP, and I'm a bit mixed on the verbs HEAD and OPTIONS.

  • OPTIONS  Used to retrieve the available HTTP verbs for a given resource?
  • HEAD Used to determine whether a given resource is available?

If someone could clarify* these verbs, that would be much appreciated.

* The clarification was with respect to RESTful API architectures re-purposing HTTP verbs. I've since come to the realization that both HEAD and OPTIONS should not be re-purposed, and instead behave predictably as any HTTP application should. Oh, how we grow in 2 years.

3 Answers
Related