...

/

Implementing OPTIONS to Inform Clients About Supported Operation

Implementing OPTIONS to Inform Clients About Supported Operation

Learn how to implement our API using Flask to inform clients about supported operations.

In REST, when a client needs to query a service about the operations it supports, the client issues an OPTIONS request. The OPTIONS request is always issued against the root of the service. Hence, from a URI perspective, OPTIONS and POST use the same template. We’ll see how to implement the OPTIONS endpoint to inform the clients about the operations that the products API supports.

In Flask, to provide a custom OPTIONS response, we need to return the response from a method decorated ...

Access this course and 1400+ top-rated courses and projects.