Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I log the outgoing request of urlfetch in google app engine python?

I'm having trouble getting oauth to work with linkedin in GAE Python and I suspect it's the format of the outgoing request. How can I log or somehow view the outgoing request my devserver is making to the oauth provider?

like image 522
Bob Ralian Avatar asked Jan 25 '11 07:01

Bob Ralian


People also ask

What is URL Fetch service?

URL Fetch. This service allows scripts to access other resources on the web by fetching URLs. A script can use the UrlFetch service to issue HTTP and HTTPS requests and receive responses. The UrlFetch service uses Google's network infrastructure for efficiency and scaling purposes.

Does Google App Engine support Python 3?

No, It doesn't. Google App Engine (GAE) uses sandboxed Python 2.7 runtime for Python applications. That is the normal App Engine Hosting. However, in GAE you can use Managed VM Hosting.


1 Answers

You can do this by registering an API call hook for URLFetch requests. You can see the complete contents of the request or response object by logging request.ToASCII() or response.ToASCII()

like image 77
Nick Johnson Avatar answered Oct 13 '22 18:10

Nick Johnson