Hello @max, the QUERY verb is meant to be (from the IETF link you had provided):
This specification defines a new HTTP method, QUERY, as a safe, idempotent request method that can carry request content.
The body payload of the request defines the query.
This payload is not limited SQL or any specific kind of syntax. So, it can be used with applications using any kind of database search requests - elaborate ones. You just use the payload details to form your query in the actual search program. So, the payload can be of any form which can be used to form the database query.
Having a payload is an advantage of the QUERY over the GET verb (which doesn’t have the payload option and you send the query parameters).
The memo used SQL as an example only. Yes, it is possible to send MongoDB queries as requests using the QUERY method. How it can be used, the syntax and details are to be determined by use case, specific preferences and some other details.
The example, uses the following as the QUERY request’s payload:
select surname, givenname, email limit 10
In your application you will have to transform it to actual SQL syntax and query specific table. I guess it is something similar with the MongoDB query too - as the payload is specifying (in this example) the projection and limit.