[google-appengine] Re: Fetch callback

2009-01-20 Thread djidjadji

And don't forget the '?' character

test = urlfetch.fetch('http://yourappid.appspot.com/check?'+check)

2009/1/19 Gipsy Gopinathan gipsy.ra...@gmail.com:
 I think you have to use the absolute path  in your fetch call
 ie  test = urlfetch.fetch('http://yourappid.appspot.com/check'+check)

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-19 Thread Alexander Kojevnikov

Are you trying to run this from the SDK? If so, the SDK cannot serve
more than one request at a time.

A workaround is described in the documentation:
http://code.google.com/appengine/docs/python/tools/devserver.html#Using_URL_Fetch

On Jan 19, 12:54 pm, ehmo disku...@gmail.com wrote:
 Hey guys,
 i'm trying to do something like this

 class check(webapp.RequestHandler):

   def get(self):

     url = self.request.get('url')
     self.response.out.write(url)

 class MainHandler(webapp.RequestHandler):
   def get(self):

       url = http://google.com;
       query_args = {'url':url}

       check = urllib.urlencode(query_args)
       test = urlfetch.fetch('/check'+check)

 def main():
   application = webapp.WSGIApplication([('/', MainHandler),('/check',check)],
                                        debug=True)
   wsgiref.handlers.CGIHandler().run(application)

 if __name__ == '__main__':
   main()

 but result is always

         raise InvalidURLError(str(e))
 InvalidURLError: ApplicationError: 1

 i can't find anything in docu about how to do something like this,
 maybe someone can help me? i'm preparing that check function for
 javascript ajax call, that's the reason why i'm using fetch for this.

 thnx

 --
  [who cares?]http://blog.synopsi.com
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-19 Thread Andy Freeman

And, even if you're trying to do it in a deployed version, there's no
guarantee that the second call will be processed by the same
interpreter.  In fact, I think that you're guaranteed that the second
call will be processed by a different interpreter.

On Jan 19, 1:07 am, Alexander Kojevnikov alexan...@kojevnikov.com
wrote:
 Are you trying to run this from the SDK? If so, the SDK cannot serve
 more than one request at a time.

 A workaround is described in the 
 documentation:http://code.google.com/appengine/docs/python/tools/devserver.html#Usi...

 On Jan 19, 12:54 pm, ehmo disku...@gmail.com wrote:



  Hey guys,
  i'm trying to do something like this

  class check(webapp.RequestHandler):

    def get(self):

      url = self.request.get('url')
      self.response.out.write(url)

  class MainHandler(webapp.RequestHandler):
    def get(self):

        url = http://google.com;
        query_args = {'url':url}

        check = urllib.urlencode(query_args)
        test = urlfetch.fetch('/check'+check)

  def main():
    application = webapp.WSGIApplication([('/', 
  MainHandler),('/check',check)],
                                         debug=True)
    wsgiref.handlers.CGIHandler().run(application)

  if __name__ == '__main__':
    main()

  but result is always

          raise InvalidURLError(str(e))
  InvalidURLError: ApplicationError: 1

  i can't find anything in docu about how to do something like this,
  maybe someone can help me? i'm preparing that check function for
  javascript ajax call, that's the reason why i'm using fetch for this.

  thnx

  --
   [who cares?]http://blog.synopsi.com- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-18 Thread Gipsy Gopinathan
I think you have to use the absolute path  in your fetch call
ie  test = urlfetch.fetch('http://yourappid.appspot.com/check'+check)

On Sun, Jan 18, 2009 at 7:54 PM, ehmo disku...@gmail.com wrote:


 Hey guys,
 i'm trying to do something like this

 class check(webapp.RequestHandler):

  def get(self):

url = self.request.get('url')
self.response.out.write(url)

 class MainHandler(webapp.RequestHandler):
  def get(self):

  url = http://google.com;
  query_args = {'url':url}

  check = urllib.urlencode(query_args)
  test = urlfetch.fetch('/check'+check)

 def main():
  application = webapp.WSGIApplication([('/',
 MainHandler),('/check',check)],
   debug=True)
  wsgiref.handlers.CGIHandler().run(application)


 if __name__ == '__main__':
  main()



 but result is always

raise InvalidURLError(str(e))
 InvalidURLError: ApplicationError: 1

 i can't find anything in docu about how to do something like this,
 maybe someone can help me? i'm preparing that check function for
 javascript ajax call, that's the reason why i'm using fetch for this.

 thnx

 --
  [who cares?]
 http://blog.synopsi.com


 



-- 
cheers
Gipsy

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---