Making a POST request to cbq-engine

Is there any documentation on how to make a POST request to the cbq-engine? (Specifically, how do I put the query string into the POST data? I tried just using the query string itself as all the POST data but got a 500 error.)

Thanks,
Keith Schnable

2 Answers

« Back to question.

You can put the query in the body of the POST but the Content-Type header must be set to text/plain.

Here is an example using curl:

curl -H"Content-Type: text/plain" -XPOST http://localhost:8093/query -d "SELECT * FROM contacts"

« Back to question.

Nevermind I figured it out.

Post data is just URL parameter q. For example:
q=SELECT%20'Hello%20World'%20AS%20Greeting%0A