Re: google.visualization.Query to send parameter using POST rather than GET

182 views
Skip to first unread message

asgallant

unread,
Nov 19, 2012, 2:39:20 AM11/19/12
to google-visua...@googlegroups.com
Try using the Query#setQuery method to set the parameters.

On Sunday, November 18, 2012 9:24:41 PM UTC-5, Ignacio Elguezabal wrote:
Hello,
 I am using google visualization API as a chart generator for some of our BI reports. 
I am using the Java visualization library on the server side as well. The thing is that using google.visualization.Query I can only send parameters to my datasource using GET, but I find that the size restriction of GET method is not enough, and I would like to send POST variables to my datasource using google.visualization.Query. I need to send informations about how to filter members, but there could be a lot of members so I would end up with something like  google.visualization.Query("http://DATASOURCE?members:23,4324,24,241,1234,1234,1243...")
Is there a way to use Query and send parameters by POST??
Thank you very much for your help

Ignacio Elguezabal

unread,
Nov 21, 2012, 4:54:50 AM11/21/12
to google-visua...@googlegroups.com
Hello and thanks for your response.

I can´t use setQuery for two things. 
One, setQuery needs to be a valid query and it is used to query the datasource, not to send custom parameters. In my tomcat I have got two steps, in the first one I query the database with my custom mysql query (and here is where I need the custom parameters), and the second one it just query the DataTable (the result of the first query) with whatever it is in Query#setQuery.

Two. The content of setQuery is appended to the URL so is sent equaly by GET. So same restrictions apply.

Cristian

unread,
Mar 22, 2013, 1:14:22 AM3/22/13
to google-visua...@googlegroups.com
Hi Ignacio,
I have the same problem, the GET method does not support the number of characters in my office and I generated the error 'HTTP Error 413 Request Entity Too Large'
I would love for the GET method to change the POST method for sending parameters, any ideas?

asgallant

unread,
Mar 22, 2013, 1:38:20 AM3/22/13
to google-visua...@googlegroups.com
What data source are you querying?  Is it something on your own server, or is it from a public service like the Google spreadsheets?
Reply all
Reply to author
Forward
0 new messages