Skip to main content
Add link to official solution.
Source Link
Eyal Levin
  • 18.9k
  • 8
  • 73
  • 61

Install the requests-toolbelt library: https://github.com/sigmavirus24/requests-toolbelt

For App Engine it could be something like: pip install requests-toolbelt -t lib

(See: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library)

Then add:

from requests_toolbelt.adapters import appengine
appengine.monkeypatch()

In your main.py or equivalent.

Edit: this solution is now part of the official documentation: https://cloud.google.com/appengine/docs/python/issue-requests#issuing_an_http_request (in the REQUESTS tab)

Install the requests-toolbelt library: https://github.com/sigmavirus24/requests-toolbelt

For App Engine it could be something like: pip install requests-toolbelt -t lib

(See: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library)

Then add:

from requests_toolbelt.adapters import appengine
appengine.monkeypatch()

In your main.py or equivalent.

Install the requests-toolbelt library: https://github.com/sigmavirus24/requests-toolbelt

For App Engine it could be something like: pip install requests-toolbelt -t lib

(See: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library)

Then add:

from requests_toolbelt.adapters import appengine
appengine.monkeypatch()

In your main.py or equivalent.

Edit: this solution is now part of the official documentation: https://cloud.google.com/appengine/docs/python/issue-requests#issuing_an_http_request (in the REQUESTS tab)

Source Link
Eyal Levin
  • 18.9k
  • 8
  • 73
  • 61

Install the requests-toolbelt library: https://github.com/sigmavirus24/requests-toolbelt

For App Engine it could be something like: pip install requests-toolbelt -t lib

(See: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27#installing_a_library)

Then add:

from requests_toolbelt.adapters import appengine
appengine.monkeypatch()

In your main.py or equivalent.