0
votes

Does anyone know, if I can fetch an internal AppEngine url from within my AppEngine app?

The official URL Fetch Python API doesn´t cover that. http://code.google.com/intl/et-EE/appengine/docs/python/urlfetch/overview.html

I tried different possibilities, but as it seems nothing works. Does anyone did that before?

urllib2.urlopen('http://127.0.0.1:8080/start_something/') or urllib2.urlopen('/start_something/') ...

Thanks in advance.

1
What do u mean by internal? Paths that are under the same host? - Y.H Wong
Why do you want to access your files as urls? Can't you read them as files itself as they are available for you in your path? - Senthil Kumaran
"start_something", unless badly misnamed, sounds like a perfect candidate for the task queue API. - Wooble

1 Answers

6
votes

This will not work at all with the development server. It is single-threaded, so trying to load one of your app's URL's while inside one of its request handlers will hang until the URLFetch times out.

It should work with no problems at all in production.

To get around the development server limitation, you should run two instances on different ports.