v.20.7New Feature

Added X-ClickHouse-Database and X-ClickHouse-Format HTTP Headers

Added http headers X-ClickHouse-Database and X-ClickHouse-Format which may be used to set default database and output format. #12981 (hcz).
Added HTTP headers X-ClickHouse-Database and X-ClickHouse-Format to set the default database and output format for ClickHouse HTTP requests.

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_format


Replace your_database_name with the default database to use, and desired_format with the output format like JSON, CSV, etc.