I’ve been trying somewhat in vain to debug a REST interface that’s failing when running under GAE. After some searching, I found a way to force the local development server to use an http proxy (such as Charles or Membrane).
Make the following changes in the file:
around line 193:
<pre> try: if protocol == 'http': logging.debug("using proxy instead of %s path=%s", host, path) connection = httplib.HTTPConnection("127.0.0.1", 8888) # host and port of proxy server path = "http://%s%s"%(host,path) logging.debug("new path is: '%s'", path) elif protocol == 'https': connection = httplib.HTTPSConnection(host) else: error_msg = 'Redirect specified invalid protocol: "%s"' % protocol logging.error(error_msg) raise apiproxy_errors.ApplicationError( urlfetch_service_pb.URLFetchServiceError.FETCH_ERROR, error_msg) </pre>
You may wish to make the same change for Https as well. It would not be too hard to fix it the right way by having it check for the http_proxy environment variable, but I haven’t done that.