1

this is my code:

url = "/aa"
result = urlfetch.fetch(url)

but it will be error , because you have to get the full url , like this :http://digu.com

so any easy way to get the full url in my code ,

thanks

zjm1126
  • 34,604
  • 53
  • 121
  • 166

1 Answers1

5

Do you mean the full URL of your own app?

You might want self.request.host (which would be eg digu.com) or self.request.host_url (which would be eg http://digu.com).

See the documentation for the app engine Request class, and also the WebOb Request class it is based on.

However, why would you make a urlfetch to your own app?

Saxon Druce
  • 17,406
  • 5
  • 50
  • 71