Skip to main content

Access HTTP Request Properties

You can effortlessly access data from the HTTP request or custom headers as query conditions using the {{ }} syntax in your SQL file.

Here's an example:

{{ context.req.method }} = 'GET'
{{ context.req.header.customParameters }} = 'custom parameters'

In this example, the query checks if the request method is 'GET' and if the custom header 'customParameters' has the expected value. You can use this approach to access various request properties and integrate them into your query conditions.

For more information on available parameters, please refer to: Koa.js Request