Automatic Options Response

All Jade REST applications have a built‑in automatic response for OPTIONS requests. OPTIONS requests are similar to other HTTP requests (for example, GET, POST, PUT, and so on) in their syntax.

The purpose of OPTIONS requests is not to modify or retrieve data but to query the REST application to find out which HTTP verbs are supported for a specified endpoint. For example, if a REST application implements two REST methods for the /Customer endpoint (for example, getCustomer and postCustomer), an OPTIONS request for the /Customer endpoint will return that the GET and POST verbs are supported.

A minimal OPTIONS request for the /Customer endpoint might look like the following.

OPTIONS /Customer HTTP/1.1

If the REST application has the getCustomer and postCustomer method endpoints, the following automatic response would be generated.

HTTP/1.1 200 OK
Connection: close
Content-Length: 0
Allow: OPTIONS, GET, POST

OPTIONS requests are often made automatically by browsers to check if the server is willing to accept the actual request. This is part of the CORS (Cross-Origin Resource Sharing) mechanism, which ensures that requests made between different origins are safe.

2025.0.02 and higher