10x ! It worked :)

On Dec 29, 12:33 am, Alexander Kojevnikov <alexan...@kojevnikov.com>
wrote:
> You should use the response object:
>
>   def get(self):
>     self.response.headers['Content-Type'] = 'text/plain'
>     self.response.out.write('your json')
>
> Cheers,
> Alex
> --www.muspy.com
>
> On Dec 29, 9:19 am, Chen Harel <chook.ha...@gmail.com> wrote:
>
> > I'm trying to create a data table in an appengine, and send it back to
> > a user.
> > The user requests the data table using GET method, and I use
>
> > class MainPage(webapp.RequestHandler):
> >   # This function is invoked when a user sends a get request
> >   def get(self):
> >     self.response.out.write("...")
>
> > To give him the response.
> > The only problem is, that for visualizations, the tutorial states that
> > the response should return:
> > print "Content-type: text/plain"
> > print
> > print data_table.ToJSonResponse(columns_order=("name", "salary",
> > "full_time"),
> >                                 order_by="salary")
>
> > (No <html> stuff...)
>
> > But when I use it, I get the headers spilled into my response.
>
> > What is the best way to send text/plain response from get request?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to