Request google app engine flex enviroment

40 views
Skip to first unread message

Francisco Javier Gonzalez

unread,
Oct 27, 2017, 3:47:35 PM10/27/17
to Google App Engine

I do a http request with module requests in django (python 3),

import requests
url = 'https://www.google.es'
r = requests.get(url)
str = str(r.content)

and It work right in localhost, but when I deploy in Google App Engine, It return a "('Connection aborted.', error(104, 'connection reset by peer'))", I deploy in a flex enviroment.

I read than it not necessary change for urlfetch module.

Yannick (Cloud Platform Support)

unread,
Oct 27, 2017, 4:47:47 PM10/27/17
to Google App Engine
Hello Francisco, the recommended method for issuing http requests on App Engine Python is to use the URL Fetch service. You can also use the "requests" library by following these instructions.
Reply all
Reply to author
Forward
0 new messages