2014-04-11 44 views

回答

1
import urllib2 

url = "http://www.google.com/" 
try: 
    result = urllib2.urlopen(url) 
    doSomethingWithResult(result) 
except urllib2.URLError, e: 
    handleError(e) 

https://developers.google.com/appengine/docs/python/urlfetch/

+0

非常感謝你:)我可以用它來連接到GCM服務器,這是正確的? – user3516596

+0

np。對gcm不太瞭解,但是如果你可以通過http與它進行交互,那麼是的。 –

+0

非常感謝你,非常有幫助 – user3516596