Every server that returns a response over HTTP, must first return a header,
that includes at least the content-type of the returned data.
(Usually something like "Content-type: text/html"), following by 2 newlines
("\n\n").
Only after that you can write your data (the gviz response for example).
The gviz_api library does not write the Content-type header, and you have to
print it out yourself.
If you'll print the output from gviz_api library after the header, it should
work just fine.
Regards,
VizBoy.
On Fri, Jan 16, 2009 at 11:15 AM, todu <[email protected]> wrote:
>
> I have used the Data Source python library on top of an app engine
> local datastore and am able to see the JSON data
>
> google.visualization.Query.setResponse({'version':'0.5', 'reqId':'0',
> 'status':'OK', 'table': {cols: [{id:'name',label:'Name',type:'string'},
> {id:'city',label:'City',type:'string'}],rows: [{c:[{v:'h1'},{v:'c1'}]},
> {c:[{v:'h2'},{v:'c2'}]}]}}); Status: 200 OK Content-Type: text/html;
> charset=utf-8 Cache-Control: no-cache Content-Length: 0
>
> But when I am using a visualization query I get a timeout?
>
> var datasource = "http://localhost:8080/table";
> var listquery = "select name";
> var query = new google.visualization.Query(datasource);
> query.setQuery(listquery);
> query.send(handleQueryResponse);
>
> Also have another issue .. I get a table if I use
> http://google-visualization.appspot.com/python/dynamic_example as the
> source but gives me whole table instead of just the name column.
>
>
> Whats am I doing wrong here any thoughts.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---