0

I want to send a request from my google app engine to another server, currently i am using python and Webapp2 framework. I think it should to be similar to curl library in php ! How could i do that ?thanks

2 Answers 2

2

There is also the urlfetch service. urllib2 uses this, so for simple tasks urlfetch is usually a little easier. However urlfetch is specific to appengine, so that is a reason not to use it if you want portable code.

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

Sign up to request clarification or add additional context in comments.

Comments

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/

2 Comments

thank you very much :) I can use this to connect to gcm server ,that is right?
np. Don't know much about gcm, but if you can interact with it over http then yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.