v.20.7New Feature
Added X-ClickHouse-Database and X-ClickHouse-Format HTTP Headers
Added http headersX-ClickHouse-DatabaseandX-ClickHouse-Formatwhich may be used to set default database and output format. #12981 (hcz).
Why it matters
This feature allows users to specify the default database and result output format through HTTP headers, simplifying client requests and configuration by avoiding repetitive query parameters or settings.How to use it
When sending an HTTP request to ClickHouse, include the headers:X-ClickHouse-Database: your_database_name
X-ClickHouse-Format: desired_formatReplace
your_database_name with the default database to use, and desired_format with the output format like JSON, CSV, etc.