开发者

AppEngine: Can I fetch an internal url?

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('ht开发者_JAVA技巧tp://127.0.0.1:8080/start_something/') or urllib2.urlopen('/start_something/') ...

Thanks in advance.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜