Skip to content Skip to sidebar Skip to footer

Has Any Easy Way To Get Full Url Using Python On Gae

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

Solution 1:

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?

Post a Comment for "Has Any Easy Way To Get Full Url Using Python On Gae"