Getting the list of HTTP methods supported in the service

When Kaspersky Scan Engine is working in HTTP mode, you can make the OPTIONS request to all supported API methods. This request allows you to get information about the HTTP methods that are supported in the kavhttpd service.

To make a request, specify an API method for the OPTIONS method.

The following block shows an example of the OPTIONS request:

OPTIONS /api/v3.1/version HTTP/1.1

The following example shows the corresponding response:

HTTP/1.1 200 OK

Date: Wed, 15 Jul 2020 10:15:44 GMT

Content-Length: 0

Allow: OPTIONS, GET

where Allow contains the list of HTTP methods that are supported in this API method.

If the HTTP request contains the Origin field (a field that contains the IP address or host name that initiates the request) and if the AccessControlAllowOrigin element is defined in the HTTP mode configuration file, the response will contain the Access-Control-Allow-Origin and Access-Control-Allow-Methods fields instead of the Allow field. In this case, the Access-Control-Allow-Origin field can contain the values that are described in the ServerSettings > CORS section and the Access-Control-Allow-Methods field value is similar to the Allow field value.

Page top