Clickhouse: Send Query Parameters through POST body

Created on 26 Jan 2020  Â·  6Comments  Â·  Source: ClickHouse/ClickHouse

I'd like to be able to pass Query Parameters through POST body

$ curl -sS "<address>?param_id=2&param_phrase=test" -d "SELECT * FROM table WHERE int_column = {id:UInt8} and string_column = {phrase:String}"

When having high amount of parameters it produces very long URL. Would it make sense to have an option to pass it through POST body as well?

feature st-accepted

Most helpful comment

Yes, we need to implement it.

All 6 comments

Yes, we need to implement it.

It has been implemented in customhttp patch

@zhang2014 do you have a link/reference? Is it this? https://github.com/ClickHouse/ClickHouse/pull/7572
Thanks!

@zhang2014 Thank you! Your PR has suspended for unknown reason, I will take it.

In #7572 query parameters can be sent through URL parameters or request headers for any HTTP method, but looks like it does not allow sending query parameters through POST body.

I forgot about it when trying to resolve the conflict. let me check again.

Was this page helpful?
0 / 5 - 0 ratings